diff options
author | amanda@chromium.org <amanda@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-10-01 19:41:56 +0000 |
---|---|---|
committer | amanda@chromium.org <amanda@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-10-01 19:41:56 +0000 |
commit | 1d5ac66b45c8e625fb4ec382d4e38e5357fdb257 (patch) | |
tree | b98aaaafe5243bcd63d0db902d6c8bf1e415dec9 /chrome/browser/plugin_process_host.cc | |
parent | 4c98db35cdd001ce1585bc703375c92ec3ebea9b (diff) | |
download | chromium_src-1d5ac66b45c8e625fb4ec382d4e38e5357fdb257.zip chromium_src-1d5ac66b45c8e625fb4ec382d4e38e5357fdb257.tar.gz chromium_src-1d5ac66b45c8e625fb4ec382d4e38e5357fdb257.tar.bz2 |
Fix several issues around fullscreen Mac plugins:
* Keystrokes are now properly sent to plugins in fullscreen mode
* When a plugin creates a fullscreen window, we hide the menu bar and restore it when the window is closed
BUG=19534,21020
TEST=Open a page with plugins that can go full screen (example: flash video players). Enter full screen mode and verify that esc, arrow keys, spacebar, etc. work as expected. Verify that the menu bar is hidden when the plugin goes fullscreen and is restored when it exits fullscreen mode.
Review URL: http://codereview.chromium.org/257008
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@27755 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/plugin_process_host.cc')
-rw-r--r-- | chrome/browser/plugin_process_host.cc | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/chrome/browser/plugin_process_host.cc b/chrome/browser/plugin_process_host.cc index 4c1d949..142315d 100644 --- a/chrome/browser/plugin_process_host.cc +++ b/chrome/browser/plugin_process_host.cc @@ -27,7 +27,10 @@ #include "base/scoped_ptr.h" #include "base/string_util.h" #include "base/thread.h" +#include "chrome/browser/browser.h" +#include "chrome/browser/browser_list.h" #include "chrome/browser/browser_process.h" +#include "chrome/browser/browser_window.h" #include "chrome/browser/child_process_security_policy.h" #include "chrome/browser/chrome_plugin_browsing_context.h" #include "chrome/browser/chrome_thread.h" @@ -325,6 +328,13 @@ PluginProcessHost::~PluginProcessHost() { window_index++) { PostMessage(*window_index, WM_CLOSE, 0, 0); } +#elif defined(OS_MACOSX) + // If the plugin process crashed but had windows open at the time, make + // sure that the menu bar is visible if the browser window is not also in + // fullscreen mode. + if (!plugin_visible_windows_set_.empty()) { + SetSystemUIMode(kUIModeNormal, 0); + } #endif } @@ -477,6 +487,16 @@ void PluginProcessHost::OnMessageReceived(const IPC::Message& msg) { IPC_MESSAGE_HANDLER(PluginProcessHostMsg_MapNativeViewId, OnMapNativeViewId) #endif +#if defined(OS_MACOSX) + IPC_MESSAGE_HANDLER(PluginProcessHostMsg_PluginSelectWindow, + OnPluginSelectWindow) + IPC_MESSAGE_HANDLER(PluginProcessHostMsg_PluginShowWindow, + OnPluginShowWindow) + IPC_MESSAGE_HANDLER(PluginProcessHostMsg_PluginHideWindow, + OnPluginHideWindow) + IPC_MESSAGE_HANDLER(PluginProcessHostMsg_PluginDisposeWindow, + OnPluginDisposeWindow) +#endif IPC_MESSAGE_UNHANDLED_ERROR() IPC_END_MESSAGE_MAP() } |