mirror of
http://git.xinwangdao.com/cnnc-embedded-parts-detect/detect.git
synced 2025-06-24 13:34:13 +08:00
30 lines
819 B
C#
30 lines
819 B
C#
using Xilium.CefGlue;
|
|
using Xilium.CefGlue.Common.Handlers;
|
|
|
|
namespace WebViewControl {
|
|
|
|
partial class WebView {
|
|
|
|
private class InternalFocusHandler : FocusHandler {
|
|
|
|
private WebView OwnerWebView { get; }
|
|
|
|
public InternalFocusHandler(WebView webView) {
|
|
OwnerWebView = webView;
|
|
}
|
|
|
|
protected override void OnGotFocus(CefBrowser browser) {
|
|
OwnerWebView.OnGotFocus();
|
|
}
|
|
|
|
protected override bool OnSetFocus(CefBrowser browser, CefFocusSource source) {
|
|
return OwnerWebView.OnSetFocus(source == CefFocusSource.System);
|
|
}
|
|
|
|
protected override void OnTakeFocus(CefBrowser browser, bool next) {
|
|
OwnerWebView.OnLostFocus();
|
|
}
|
|
}
|
|
}
|
|
}
|