diff options
author | stuartmorgan@chromium.org <stuartmorgan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-02-01 21:23:43 +0000 |
---|---|---|
committer | stuartmorgan@chromium.org <stuartmorgan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-02-01 21:23:43 +0000 |
commit | 941e455373dbbe837fe2e82d139af4dec1d35ddb (patch) | |
tree | 07cfc55341b2e0a62d38f821e0ca423db7f146ce /chrome/plugin/webplugin_delegate_stub.cc | |
parent | b51cda7cb0bddadb1f4cca4c18eb27313300aa21 (diff) | |
download | chromium_src-941e455373dbbe837fe2e82d139af4dec1d35ddb.zip chromium_src-941e455373dbbe837fe2e82d139af4dec1d35ddb.tar.gz chromium_src-941e455373dbbe837fe2e82d139af4dec1d35ddb.tar.bz2 |
Add tab switch notification to the Mac plugin plumbing.
Using the new notification:
- Update plugin clip rect when it's not in a visible tab.
- Update plugin idle event rate when it's not in a visible tab.
- Switch the unfocus-on-tab-switch event to be based on the this new notification, instead of a browser-level broadcast.
Related changes:
- Stop sending redundant focus events to plugins.
- Send window activation to Carbon event plugins too, not just Cocoa.
- Now that plugins are getting window and tab de-focus events directly, remove the older hack to force all plugins to lose focus any window or tab loses focus.
BUG=29371, 32229, 30838
TEST=Flash should still only register keystrokes when it is in the active window+tab. Plugins in background tabs should use less CPU.
Review URL: http://codereview.chromium.org/548224
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@37743 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/plugin/webplugin_delegate_stub.cc')
-rw-r--r-- | chrome/plugin/webplugin_delegate_stub.cc | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/chrome/plugin/webplugin_delegate_stub.cc b/chrome/plugin/webplugin_delegate_stub.cc index 253d7cf..cf6e842 100644 --- a/chrome/plugin/webplugin_delegate_stub.cc +++ b/chrome/plugin/webplugin_delegate_stub.cc @@ -123,6 +123,8 @@ void WebPluginDelegateStub::OnMessageReceived(const IPC::Message& msg) { OnSendJavaScriptStream) #if defined(OS_MACOSX) IPC_MESSAGE_HANDLER(PluginMsg_SetWindowFocus, OnSetWindowFocus) + IPC_MESSAGE_HANDLER(PluginMsg_SetContainerVisibility, + OnSetContainerVisibility) #endif IPC_MESSAGE_HANDLER(PluginMsg_DidReceiveManualResponse, OnDidReceiveManualResponse) @@ -338,7 +340,11 @@ void WebPluginDelegateStub::OnSendJavaScriptStream(const GURL& url, void WebPluginDelegateStub::OnSetWindowFocus(bool has_focus) { delegate_->SetWindowHasFocus(has_focus); } -#endif + +void WebPluginDelegateStub::OnSetContainerVisibility(bool is_visible) { + delegate_->SetContainerVisibility(is_visible); +} +#endif // OS_MACOSX void WebPluginDelegateStub::OnDidReceiveManualResponse( const GURL& url, |