diff options
author | stuartmorgan@chromium.org <stuartmorgan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-09-18 00:02:34 +0000 |
---|---|---|
committer | stuartmorgan@chromium.org <stuartmorgan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-09-18 00:02:34 +0000 |
commit | 784ea1ab3797a0aade739c3d80f9f12b41160aef (patch) | |
tree | c3abea80550ba03a41eab24e7579d9b0df1beb4f /chrome/renderer/webplugin_delegate_proxy.cc | |
parent | 9c0a58008e54678318d98d0a519bd47e9bd84f07 (diff) | |
download | chromium_src-784ea1ab3797a0aade739c3d80f9f12b41160aef.zip chromium_src-784ea1ab3797a0aade739c3d80f9f12b41160aef.tar.gz chromium_src-784ea1ab3797a0aade739c3d80f9f12b41160aef.tar.bz2 |
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/3397015
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@59877 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/renderer/webplugin_delegate_proxy.cc')
-rw-r--r-- | chrome/renderer/webplugin_delegate_proxy.cc | 18 |
1 files changed, 7 insertions, 11 deletions
diff --git a/chrome/renderer/webplugin_delegate_proxy.cc b/chrome/renderer/webplugin_delegate_proxy.cc index a5490af..2dd4581 100644 --- a/chrome/renderer/webplugin_delegate_proxy.cc +++ b/chrome/renderer/webplugin_delegate_proxy.cc @@ -204,10 +204,8 @@ void WebPluginDelegateProxy::PluginDestroyed() { if (window_) WillDestroyWindow(); -#if defined(OS_MACOSX) if (render_view_) render_view_->UnregisterPluginDelegate(this); -#endif if (channel_host_) { Send(new PluginMsg_DestroyInstance(instance_id_)); @@ -384,9 +382,7 @@ bool WebPluginDelegateProxy::Initialize(const GURL& url, IPC::Message* msg = new PluginMsg_Init(instance_id_, params, &result); Send(msg); -#if defined(OS_MACOSX) render_view_->RegisterPluginDelegate(this); -#endif return result; } @@ -983,19 +979,19 @@ int WebPluginDelegateProxy::GetProcessId() { return channel_host_->peer_pid(); } -#if defined(OS_MACOSX) -void WebPluginDelegateProxy::SetWindowFocus(bool window_has_focus) { - IPC::Message* msg = new PluginMsg_SetWindowFocus(instance_id_, - window_has_focus); +void WebPluginDelegateProxy::SetContentAreaFocus(bool has_focus) { + IPC::Message* msg = new PluginMsg_SetContentAreaFocus(instance_id_, + has_focus); // Make sure focus events are delivered in the right order relative to // sync messages they might interact with (Paint, HandleEvent, etc.). msg->set_unblock(true); Send(msg); } -void WebPluginDelegateProxy::SetContentAreaFocus(bool has_focus) { - IPC::Message* msg = new PluginMsg_SetContentAreaFocus(instance_id_, - has_focus); +#if defined(OS_MACOSX) +void WebPluginDelegateProxy::SetWindowFocus(bool window_has_focus) { + IPC::Message* msg = new PluginMsg_SetWindowFocus(instance_id_, + window_has_focus); // Make sure focus events are delivered in the right order relative to // sync messages they might interact with (Paint, HandleEvent, etc.). msg->set_unblock(true); |