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..b9c1214e858ec4e2837211dc70d71bf6926d8c16 100644 |
--- a/chrome/browser/ui/exclusive_access/fullscreen_controller.cc |
+++ b/chrome/browser/ui/exclusive_access/fullscreen_controller.cc |
@@ -140,13 +140,10 @@ 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(true); |
+ state_prior_to_tab_fullscreen_ = STATE_BROWSER_FULLSCREEN; |
} |
// We need to update the fullscreen exit bubble, e.g., going from browser |
@@ -183,11 +180,9 @@ 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(false); |
#if defined(OS_MACOSX) |
// Clear the bubble URL, which forces the Mac UI to redraw. |
@@ -337,19 +332,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 |
Nico
2016/06/22 21:35:54
why is this block no longer needed?
spqchan
2016/06/22 22:33:37
This is only used if we're switching between Prese
|
- |
// 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()) |