summaryrefslogtreecommitdiffstats
path: root/chrome/browser/plugin_process_host.cc
diff options
context:
space:
mode:
authoramanda@chromium.org <amanda@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-10-06 21:33:21 +0000
committeramanda@chromium.org <amanda@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-10-06 21:33:21 +0000
commitd5c8e13701ca6001d2293365d02265693891bc8d (patch)
tree19b8b668119ec2da5f255f8d57fc8d8a15967985 /chrome/browser/plugin_process_host.cc
parent880ea5b3b3739c74d51c249627017a7ccac2db94 (diff)
downloadchromium_src-d5c8e13701ca6001d2293365d02265693891bc8d.zip
chromium_src-d5c8e13701ca6001d2293365d02265693891bc8d.tar.gz
chromium_src-d5c8e13701ca6001d2293365d02265693891bc8d.tar.bz2
Fix a crash when a plugin file picker window is dismissed. This is a
spot fix--a comprehensive fix will require http://code.google.com/p/chromium/issues/detail?id=23571 BUG=23774 TEST=upload a file via Flash (example: Gmail, YouTube). The browser should not crash after you click "OK" to dismiss the file picker. Review URL: http://codereview.chromium.org/242161 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@28158 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/plugin_process_host.cc')
-rw-r--r--chrome/browser/plugin_process_host.cc11
1 files changed, 8 insertions, 3 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
}