summaryrefslogtreecommitdiffstats
path: root/chrome/browser
diff options
context:
space:
mode:
authorstuartmorgan@chromium.org <stuartmorgan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-11-18 03:14:20 +0000
committerstuartmorgan@chromium.org <stuartmorgan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-11-18 03:14:20 +0000
commita3d46f7e58274fc65cb89628a8e89fc49bca2750 (patch)
treedb6a07cadcb1d8f39c578f28b157a54417f609a5 /chrome/browser
parentc46dd1c71c8376f6df879fd394634f31c25b9535 (diff)
downloadchromium_src-a3d46f7e58274fc65cb89628a8e89fc49bca2750.zip
chromium_src-a3d46f7e58274fc65cb89628a8e89fc49bca2750.tar.gz
chromium_src-a3d46f7e58274fc65cb89628a8e89fc49bca2750.tar.bz2
Only request full-screen once per plugin window
BUG=28019 TEST=Make Silverlight full screen on the Mac, then shrink it back to in-page mode; the dock should re-appear. Review URL: http://codereview.chromium.org/402028 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@32270 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser')
-rw-r--r--chrome/browser/plugin_process_host_mac.cc6
1 files changed, 5 insertions, 1 deletions
diff --git a/chrome/browser/plugin_process_host_mac.cc b/chrome/browser/plugin_process_host_mac.cc
index f003a4c..bea1cbc 100644
--- a/chrome/browser/plugin_process_host_mac.cc
+++ b/chrome/browser/plugin_process_host_mac.cc
@@ -32,10 +32,14 @@ void PluginProcessHost::OnPluginShowWindow(uint32 window_id,
{ window_rect.width(), window_rect.height() }
};
CGRect main_display_bounds = CGDisplayBounds(CGMainDisplayID());
- if (CGRectEqualToRect(window_bounds, main_display_bounds)) {
+ if (CGRectEqualToRect(window_bounds, main_display_bounds) &&
+ (plugin_fullscreen_windows_set_.find(window_id) ==
+ plugin_fullscreen_windows_set_.end())) {
plugin_fullscreen_windows_set_.insert(window_id);
// If the plugin has just shown a window that's the same dimensions as
// the main display, hide the menubar so that it has the whole screen.
+ // (but only if we haven't already seen this fullscreen window, since
+ // otherwise our refcounting can get skewed).
ChromeThread::PostTask(
ChromeThread::UI, FROM_HERE,
NewRunnableFunction(mac_util::RequestFullScreen));