summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--chrome/browser/plugin_process_host.cc11
-rw-r--r--chrome/browser/plugin_process_host_mac.cc6
2 files changed, 13 insertions, 4 deletions
diff --git a/chrome/browser/plugin_process_host.cc b/chrome/browser/plugin_process_host.cc
index 142315d..573e0a9 100644
--- a/chrome/browser/plugin_process_host.cc
+++ b/chrome/browser/plugin_process_host.cc
@@ -330,10 +330,15 @@ PluginProcessHost::~PluginProcessHost() {
}
#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.
+ // sure that the menu bar is visible.
+ // TODO: only do this if the browser window is not also in fullscreen mode.
+ // (see http://code.google.com/p/chromium/issues/detail?id=23571)
if (!plugin_visible_windows_set_.empty()) {
- SetSystemUIMode(kUIModeNormal, 0);
+ SystemUIMode mode;
+ SystemUIOptions options;
+ GetSystemUIMode(&mode, &options);
+ if (mode != kUIModeNormal)
+ SetSystemUIMode(kUIModeNormal, 0);
}
#endif
}
diff --git a/chrome/browser/plugin_process_host_mac.cc b/chrome/browser/plugin_process_host_mac.cc
index d222880..65ead0a 100644
--- a/chrome/browser/plugin_process_host_mac.cc
+++ b/chrome/browser/plugin_process_host_mac.cc
@@ -34,7 +34,11 @@ void PluginProcessHost::OnPluginShowWindow(uint32 window_id,
void PluginProcessHost::OnPluginHideWindow(uint32 window_id,
gfx::Rect window_rect) {
plugin_visible_windows_set_.erase(window_id);
- SetSystemUIMode(kUIModeNormal, 0);
+ SystemUIMode mode;
+ SystemUIOptions options;
+ GetSystemUIMode(&mode, &options);
+ if (mode != kUIModeNormal)
+ SetSystemUIMode(kUIModeNormal, 0);
}
void PluginProcessHost::OnPluginDisposeWindow(uint32 window_id,