summaryrefslogtreecommitdiffstats
path: root/chrome/browser/plugin_process_host_mac.cc
diff options
context:
space:
mode:
authorstuartmorgan@chromium.org <stuartmorgan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-11-18 03:53:50 +0000
committerstuartmorgan@chromium.org <stuartmorgan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-11-18 03:53:50 +0000
commited8ccb3ed021dc7491f74a43c23bdf9594ba9f2e (patch)
tree7946a8534cc8a4056dc0564e47094d99a3ae69fc /chrome/browser/plugin_process_host_mac.cc
parent24b2cd1bd69407b47b668dbbf926f55ac1ac375f (diff)
downloadchromium_src-ed8ccb3ed021dc7491f74a43c23bdf9594ba9f2e.zip
chromium_src-ed8ccb3ed021dc7491f74a43c23bdf9594ba9f2e.tar.gz
chromium_src-ed8ccb3ed021dc7491f74a43c23bdf9594ba9f2e.tar.bz2
Merge 32270 - Only request fullscreen once per plugin window
BUG=28019 TEST=Make Silverlight full screen on the Mac, then shrink it back to inpage mode; the dock should reappear. Review URL: http://codereview.chromium.org/402028 TBR=stuartmorgan@chromium.org Review URL: http://codereview.chromium.org/399059 git-svn-id: svn://svn.chromium.org/chrome/branches/249/src@32276 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/plugin_process_host_mac.cc')
-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));