From 8d944b369dc0979cc9926cdda7673682bf8e5bef Mon Sep 17 00:00:00 2001 From: "thakis@chromium.org" Date: Mon, 17 Oct 2011 06:11:53 +0000 Subject: Change EnterFullscreen() to take an enum instead of a bool as second parameter. Also, add a UpdateFullscreenExitBubbleContent() method. At both call site and implementor side, just funnel the previous bool through the enum for now. This decouples the implementation of the new UI from the backend support. Based on a patch by Yuzhu Shen BUG=95136 TEST=everything works as before TBR=ben (OWNERS review for this part is at http://codereview.chromium.org/8274022/ ) Review URL: http://codereview.chromium.org/8313012 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@105770 0039d316-1c4b-4281-b951-d872f2087c98 --- chrome/browser/ui/browser.cc | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) (limited to 'chrome/browser/ui/browser.cc') diff --git a/chrome/browser/ui/browser.cc b/chrome/browser/ui/browser.cc index 5315d28..e2ed3b4 100644 --- a/chrome/browser/ui/browser.cc +++ b/chrome/browser/ui/browser.cc @@ -1735,7 +1735,13 @@ void Browser::ToggleFullscreenMode(bool for_tab) { (GetFullscreenSetting(url) == CONTENT_SETTING_ASK); } if (entering_fullscreen) { - window_->EnterFullscreen(url, ask_permission); + FullscreenExitBubbleType type = + FEB_TYPE_BROWSER_FULLSCREEN_EXIT_INSTRUCTION; + if (for_tab) { + type = ask_permission ? FEB_TYPE_FULLSCREEN_BUTTONS : + FEB_TYPE_FULLSCREEN_EXIT_INSTRUCTION; + } + window_->EnterFullscreen(url, type); } else { window_->ExitFullscreen(); } @@ -1769,7 +1775,17 @@ void Browser::TogglePresentationMode(bool for_tab) { ask_permission = !url.SchemeIsFile() && (GetFullscreenSetting(url) == CONTENT_SETTING_ASK); } - window_->SetPresentationMode(entering_fullscreen, url, ask_permission); + if (entering_fullscreen) { + FullscreenExitBubbleType type = + FEB_TYPE_BROWSER_FULLSCREEN_EXIT_INSTRUCTION; + if (for_tab) { + type = ask_permission ? FEB_TYPE_FULLSCREEN_BUTTONS : + FEB_TYPE_FULLSCREEN_EXIT_INSTRUCTION; + } + window_->EnterPresentationMode(url, type); + } else { + window_->ExitPresentationMode(); + } WindowFullscreenStateChanged(); } #endif -- cgit v1.1