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

Unified Diff: chrome/browser/ui/browser.cc

Issue 7890056: FullscreenExitBubble temp UI for Mac. (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: fix url? Created 9 years, 3 months 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 | « chrome/browser/ui/browser.h ('k') | chrome/browser/ui/browser_browsertest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/browser.cc
diff --git a/chrome/browser/ui/browser.cc b/chrome/browser/ui/browser.cc
index bd221324a48707e3d077e8616bbcf3923e937611..ec2aa7360811d23a9aee4e340f9232049a92a49a 100644
--- a/chrome/browser/ui/browser.cc
+++ b/chrome/browser/ui/browser.cc
@@ -1314,7 +1314,13 @@ void Browser::WindowFullscreenStateChanged() {
MessageLoop::current()->PostTask(
FROM_HERE, method_factory_.NewRunnableMethod(
&Browser::NotifyFullscreenChange));
- if (!window_->IsFullscreen())
+ bool notify_tab_of_exit;
+#if defined(OS_MACOSX)
+ notify_tab_of_exit = !window_->InPresentationMode();
+#else
+ notify_tab_of_exit = !window_->IsFullscreen();
+#endif
+ if (notify_tab_of_exit)
NotifyTabOfFullscreenExitIfNecessary();
}
@@ -3831,10 +3837,21 @@ void Browser::ToggleFullscreenModeForTab(TabContents* tab,
return;
fullscreened_tab_ = enter_fullscreen ?
TabContentsWrapper::GetCurrentWrapperForContents(tab) : NULL;
- if (enter_fullscreen && !window_->IsFullscreen())
+ bool in_correct_mode_for_tab_fullscreen;
+#if defined(OS_MACOSX)
+ in_correct_mode_for_tab_fullscreen = window_->InPresentationMode();
+#else
+ in_correct_mode_for_tab_fullscreen = window_->IsFullscreen();
+#endif
+ if (enter_fullscreen && !in_correct_mode_for_tab_fullscreen)
tab_caused_fullscreen_ = true;
- if (tab_caused_fullscreen_)
+ if (tab_caused_fullscreen_) {
+#if defined(OS_MACOSX)
+ TogglePresentationMode();
+#else
ToggleFullscreenMode();
+#endif
+ }
}
void Browser::JSOutOfMemory(TabContents* tab) {
« no previous file with comments | « chrome/browser/ui/browser.h ('k') | chrome/browser/ui/browser_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698