From 042af772cfe404f096c9fd56ebab580a373bc132 Mon Sep 17 00:00:00 2001 From: amaitland Date: Thu, 12 Jun 2014 08:18:16 +1000 Subject: [PATCH 1/4] Fix issue where OnPreKeyEvent was cherry picked from a different branch, which had some WIP changes, fixed naming of `KeyType` --- CefSharp.Core/Internals/ClientAdapter.cpp | 2 +- CefSharp/IKeyboardHandler.cs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/CefSharp.Core/Internals/ClientAdapter.cpp b/CefSharp.Core/Internals/ClientAdapter.cpp index 2b81fb405..9d623e294 100644 --- a/CefSharp.Core/Internals/ClientAdapter.cpp +++ b/CefSharp.Core/Internals/ClientAdapter.cpp @@ -143,7 +143,7 @@ namespace CefSharp return false; } - return handler->OnPreKeyEvent(_browserControl, (CefKeyType)event.type, event.windows_key_code, event.native_key_code, event.modifiers, event.is_system_key, is_keyboard_shortcut); + return handler->OnPreKeyEvent(_browserControl, (KeyType)event.type, event.windows_key_code, event.native_key_code, event.modifiers, event.is_system_key, is_keyboard_shortcut); } void ClientAdapter::OnLoadStart(CefRefPtr browser, CefRefPtr frame) diff --git a/CefSharp/IKeyboardHandler.cs b/CefSharp/IKeyboardHandler.cs index c53c9b1da..7dd417222 100644 --- a/CefSharp/IKeyboardHandler.cs +++ b/CefSharp/IKeyboardHandler.cs @@ -3,6 +3,6 @@ public interface IKeyboardHandler { bool OnKeyEvent(IWebBrowser browser, KeyType type, int code, int modifiers, bool isSystemKey); - bool OnPreKeyEvent(IWebBrowser browser, CefKeyType type, int windowsKeyCode, int nativeKeyCode, int modifiers, bool isSystemKey, bool isKeyboardShortcut); + bool OnPreKeyEvent(IWebBrowser browser, KeyType type, int windowsKeyCode, int nativeKeyCode, int modifiers, bool isSystemKey, bool isKeyboardShortcut); } } From 7a65a3f41f2096aabe590ae322e435867cc1df5f Mon Sep 17 00:00:00 2001 From: amaitland Date: Fri, 23 May 2014 16:54:53 +1000 Subject: [PATCH 2/4] Execute SetNavState on UI Thread --- CefSharp.Wpf/ChromiumWebBrowser.cs | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/CefSharp.Wpf/ChromiumWebBrowser.cs b/CefSharp.Wpf/ChromiumWebBrowser.cs index 7276c541b..4fe8047f1 100644 --- a/CefSharp.Wpf/ChromiumWebBrowser.cs +++ b/CefSharp.Wpf/ChromiumWebBrowser.cs @@ -656,11 +656,14 @@ namespace CefSharp.Wpf void IWebBrowserInternal.SetNavState(bool canGoBack, bool canGoForward, bool canReload) { - CanGoBack = canGoBack; - CanGoForward = canGoForward; - CanReload = canReload; + DoInUi(() => + { + CanGoBack = canGoBack; + CanGoForward = canGoForward; + CanReload = canReload; - RaiseCommandsCanExecuteChanged(); + RaiseCommandsCanExecuteChanged(); + }); } private void RaiseCommandsCanExecuteChanged() From c0207be9f0b7a53effa057525bcbefca843e703a Mon Sep 17 00:00:00 2001 From: amaitland Date: Thu, 12 Jun 2014 12:36:26 +1000 Subject: [PATCH 3/4] Remove already deleted NavigationType from CefSharp.csproj --- CefSharp/CefSharp.csproj | 1 - 1 file changed, 1 deletion(-) diff --git a/CefSharp/CefSharp.csproj b/CefSharp/CefSharp.csproj index 1d6fe4e88..f9b9991cf 100644 --- a/CefSharp/CefSharp.csproj +++ b/CefSharp/CefSharp.csproj @@ -95,7 +95,6 @@ - From a9cf8c30ab3016234403efe0cb2c4074098435be Mon Sep 17 00:00:00 2001 From: amaitland Date: Thu, 12 Jun 2014 12:37:02 +1000 Subject: [PATCH 4/4] Fixed `webView` to `browser` commit --- CefSharp.Wpf.Example/Views/BrowserTabView.xaml.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CefSharp.Wpf.Example/Views/BrowserTabView.xaml.cs b/CefSharp.Wpf.Example/Views/BrowserTabView.xaml.cs index 35eef5abc..1b8ba0940 100644 --- a/CefSharp.Wpf.Example/Views/BrowserTabView.xaml.cs +++ b/CefSharp.Wpf.Example/Views/BrowserTabView.xaml.cs @@ -14,7 +14,7 @@ namespace CefSharp.Wpf.Example.Views { InitializeComponent(); - webView.RequestHandler = new RequestHandler(); + browser.RequestHandler = new RequestHandler(); } private void OnTextBoxGotKeyboardFocus(object sender, KeyboardFocusChangedEventArgs e)