summaryrefslogtreecommitdiffstats
path: root/content/browser/browser_plugin/browser_plugin_embedder.h
diff options
context:
space:
mode:
authorfsamuel@chromium.org <fsamuel@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-06-18 11:27:06 +0000
committerfsamuel@chromium.org <fsamuel@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-06-18 11:27:06 +0000
commit6d5c060a34a2a9e8b4ccb4169b80153040fcacee (patch)
treed511089c723c5de8d8f2e0aabad2f66083aa1866 /content/browser/browser_plugin/browser_plugin_embedder.h
parentcb9e2632d08ca94423a5d0ba6d02590baedc3917 (diff)
downloadchromium_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.h')
-rw-r--r--content/browser/browser_plugin/browser_plugin_embedder.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/content/browser/browser_plugin/browser_plugin_embedder.h b/content/browser/browser_plugin/browser_plugin_embedder.h
index ccc4544..7e87115 100644
--- a/content/browser/browser_plugin/browser_plugin_embedder.h
+++ b/content/browser/browser_plugin/browser_plugin_embedder.h
@@ -35,6 +35,7 @@ class BrowserPluginGuestManager;
class BrowserPluginHostFactory;
class RenderWidgetHostImpl;
class WebContentsImpl;
+struct NativeWebKeyboardEvent;
class CONTENT_EXPORT BrowserPluginEmbedder : public WebContentsObserver {
public:
@@ -53,6 +54,12 @@ class CONTENT_EXPORT BrowserPluginEmbedder : public WebContentsObserver {
// Called when embedder's |rwh| has sent screen rects to renderer.
void DidSendScreenRects();
+ // Called when embedder's WebContentsImpl has unhandled keyboard input.
+ // Returns whether the BrowserPlugin has handled the keyboard event.
+ // Currently we are only interested in checking for the escape key to
+ // unlock hte guest's pointer lock.
+ bool HandleKeyboardEvent(const NativeWebKeyboardEvent& event);
+
// Overrides factory for testing. Default (NULL) value indicates regular
// (non-test) environment.
static void set_factory_for_testing(BrowserPluginHostFactory* factory) {