Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(3531)

Unified Diff: chrome/browser/plugin_process_host_mac.cc

Issue 402028: Only request full-screen once per plugin window (Closed)
Patch Set: Created 11 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/plugin_process_host_mac.cc
diff --git a/chrome/browser/plugin_process_host_mac.cc b/chrome/browser/plugin_process_host_mac.cc
index f003a4ca1d0b073efef3e2a751370e502c845498..bea1cbcc54ffcb27a62c7c5a9eadd4bda7176b3c 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));
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698