From 11963f6434c2049c1937617ea18969a496c6216e Mon Sep 17 00:00:00 2001 From: "stuartmorgan@chromium.org" Date: Fri, 17 Sep 2010 20:52:18 +0000 Subject: Extend improved windowless plugin focus handling to all platforms Uses the same two-state focus tracking that the Mac currently uses on Windows and Linux as well, so focus is updated correctly when the content area itself gains and loses focus. BUG=55607 TEST=Windowless plugins should handle key events when focused on all platforms. Review URL: http://codereview.chromium.org/3418016 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@59845 0039d316-1c4b-4281-b951-d872f2087c98 --- chrome/plugin/webplugin_delegate_stub.cc | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'chrome/plugin/webplugin_delegate_stub.cc') diff --git a/chrome/plugin/webplugin_delegate_stub.cc b/chrome/plugin/webplugin_delegate_stub.cc index 0802d31..8e74aa7 100644 --- a/chrome/plugin/webplugin_delegate_stub.cc +++ b/chrome/plugin/webplugin_delegate_stub.cc @@ -116,9 +116,9 @@ void WebPluginDelegateStub::OnMessageReceived(const IPC::Message& msg) { IPC_MESSAGE_HANDLER(PluginMsg_UpdateGeometrySync, OnUpdateGeometry) IPC_MESSAGE_HANDLER(PluginMsg_SendJavaScriptStream, OnSendJavaScriptStream) + IPC_MESSAGE_HANDLER(PluginMsg_SetContentAreaFocus, OnSetContentAreaFocus) #if defined(OS_MACOSX) IPC_MESSAGE_HANDLER(PluginMsg_SetWindowFocus, OnSetWindowFocus) - IPC_MESSAGE_HANDLER(PluginMsg_SetContentAreaFocus, OnSetContentAreaFocus) IPC_MESSAGE_HANDLER(PluginMsg_ContainerHidden, OnContainerHidden) IPC_MESSAGE_HANDLER(PluginMsg_ContainerShown, OnContainerShown) IPC_MESSAGE_HANDLER(PluginMsg_WindowFrameChanged, OnWindowFrameChanged) @@ -336,15 +336,15 @@ void WebPluginDelegateStub::OnSendJavaScriptStream(const GURL& url, delegate_->SendJavaScriptStream(url, result, success, notify_id); } +void WebPluginDelegateStub::OnSetContentAreaFocus(bool has_focus) { + delegate_->SetContentAreaHasFocus(has_focus); +} + #if defined(OS_MACOSX) void WebPluginDelegateStub::OnSetWindowFocus(bool has_focus) { delegate_->SetWindowHasFocus(has_focus); } -void WebPluginDelegateStub::OnSetContentAreaFocus(bool has_focus) { - delegate_->SetContentAreaHasFocus(has_focus); -} - void WebPluginDelegateStub::OnContainerHidden() { delegate_->SetContainerVisibility(false); } -- cgit v1.1