| Index: chrome/browser/ui/exclusive_access/fullscreen_controller.cc
|
| diff --git a/chrome/browser/ui/exclusive_access/fullscreen_controller.cc b/chrome/browser/ui/exclusive_access/fullscreen_controller.cc
|
| index 73403c520b0689d5566533dc3d4f67dfa4658e30..8a87c3b08941df5897f64fd1e5ce5e5bfd5d9882 100644
|
| --- a/chrome/browser/ui/exclusive_access/fullscreen_controller.cc
|
| +++ b/chrome/browser/ui/exclusive_access/fullscreen_controller.cc
|
| @@ -140,13 +140,11 @@ void FullscreenController::EnterFullscreenModeForTab(WebContents* web_contents,
|
| return;
|
| }
|
|
|
| + // Browser Fullscreen -> Tab Fullscreen.
|
| if (exclusive_access_context->IsFullscreen()) {
|
| - // Browser Fullscreen with Toolbar -> Tab Fullscreen (no toolbar).
|
| - exclusive_access_context->UpdateFullscreenWithToolbar(false);
|
| - state_prior_to_tab_fullscreen_ = STATE_BROWSER_FULLSCREEN_WITH_TOOLBAR;
|
| - } else {
|
| - // Browser Fullscreen without Toolbar -> Tab Fullscreen.
|
| - state_prior_to_tab_fullscreen_ = STATE_BROWSER_FULLSCREEN_NO_TOOLBAR;
|
| + exclusive_access_context->UpdateUIForTabFullscreen(
|
| + ExclusiveAccessContext::STATE_ENTER_TAB_FULLSCREEN);
|
| + state_prior_to_tab_fullscreen_ = STATE_BROWSER_FULLSCREEN;
|
| }
|
|
|
| // We need to update the fullscreen exit bubble, e.g., going from browser
|
| @@ -183,11 +181,10 @@ void FullscreenController::ExitFullscreenModeForTab(WebContents* web_contents) {
|
| return;
|
| }
|
|
|
| - // Tab Fullscreen -> Browser Fullscreen (with or without toolbar).
|
| - if (state_prior_to_tab_fullscreen_ == STATE_BROWSER_FULLSCREEN_WITH_TOOLBAR) {
|
| - // Tab Fullscreen (no toolbar) -> Browser Fullscreen with Toolbar.
|
| - exclusive_access_context->UpdateFullscreenWithToolbar(true);
|
| - }
|
| + // Tab Fullscreen -> Browser Fullscreen.
|
| + if (state_prior_to_tab_fullscreen_ == STATE_BROWSER_FULLSCREEN)
|
| + exclusive_access_context->UpdateUIForTabFullscreen(
|
| + ExclusiveAccessContext::STATE_EXIT_TAB_FULLSCREEN);
|
|
|
| #if defined(OS_MACOSX)
|
| // Clear the bubble URL, which forces the Mac UI to redraw.
|
| @@ -337,19 +334,6 @@ void FullscreenController::ToggleFullscreenModeInternal(
|
| exclusive_access_manager()->context();
|
| bool enter_fullscreen = !exclusive_access_context->IsFullscreen();
|
|
|
| -#if defined(OS_MACOSX)
|
| - // When a Mac user requests a toggle they may be toggling between
|
| - // FullscreenWithoutChrome and FullscreenWithToolbar.
|
| - // TODO(spqchan): Refactor toolbar related code since most of it should be
|
| - // deprecated.
|
| - if (exclusive_access_context->IsFullscreen() &&
|
| - !IsWindowFullscreenForTabOrPending() &&
|
| - IsExtensionFullscreenOrPending()) {
|
| - enter_fullscreen = enter_fullscreen ||
|
| - exclusive_access_context->IsFullscreen();
|
| - }
|
| -#endif
|
| -
|
| // In kiosk mode, we always want to be fullscreen. When the browser first
|
| // starts we're not yet fullscreen, so let the initial toggle go through.
|
| if (chrome::IsRunningInAppMode() && exclusive_access_context->IsFullscreen())
|
|
|