diff options
author | fsamuel@chromium.org <fsamuel@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-06-18 11:27:06 +0000 |
---|---|---|
committer | fsamuel@chromium.org <fsamuel@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-06-18 11:27:06 +0000 |
commit | 6d5c060a34a2a9e8b4ccb4169b80153040fcacee (patch) | |
tree | d511089c723c5de8d8f2e0aabad2f66083aa1866 /content/browser/browser_plugin/browser_plugin_embedder.cc | |
parent | cb9e2632d08ca94423a5d0ba6d02590baedc3917 (diff) | |
download | chromium_src-6d5c060a34a2a9e8b4ccb4169b80153040fcacee.zip chromium_src-6d5c060a34a2a9e8b4ccb4169b80153040fcacee.tar.gz chromium_src-6d5c060a34a2a9e8b4ccb4169b80153040fcacee.tar.bz2 |
<webview>: Escape key unlocks pointer by default
With this CL, the ESC key will now, by default unlock the pointer if it
was locked by a webview. The Chrome App can override this behavior by
handling the keydown event in the embedder and preventing default.
BUG=233793
Review URL: https://chromiumcodereview.appspot.com/16955007
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@206936 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content/browser/browser_plugin/browser_plugin_embedder.cc')
-rw-r--r-- | content/browser/browser_plugin/browser_plugin_embedder.cc | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/content/browser/browser_plugin/browser_plugin_embedder.cc b/content/browser/browser_plugin/browser_plugin_embedder.cc index 45aa1d8..03dc4ec 100644 --- a/content/browser/browser_plugin/browser_plugin_embedder.cc +++ b/content/browser/browser_plugin/browser_plugin_embedder.cc @@ -14,6 +14,7 @@ #include "content/common/gpu/gpu_messages.h" #include "content/public/browser/browser_context.h" #include "content/public/browser/content_browser_client.h" +#include "content/public/browser/native_web_keyboard_event.h" #include "content/public/browser/user_metrics.h" #include "content/public/common/content_switches.h" #include "content/public/common/result_codes.h" @@ -81,6 +82,12 @@ void BrowserPluginEmbedder::DidSendScreenRects() { static_cast<WebContentsImpl*>(web_contents())); } +bool BrowserPluginEmbedder::HandleKeyboardEvent( + const NativeWebKeyboardEvent& event) { + return GetBrowserPluginGuestManager()->UnlockMouseIfNecessary( + static_cast<WebContentsImpl*>(web_contents()), event); +} + void BrowserPluginEmbedder::RenderViewGone(base::TerminationStatus status) { CleanUp(); } |