diff options
author | spqchan <spqchan@chromium.org> | 2016-02-04 16:59:18 -0800 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2016-02-05 01:00:37 +0000 |
commit | cae22576c51838b5c32a2d489e8c6187dc3c451f (patch) | |
tree | 5c3b91c77d54cb50a4c9bfe8686799e0de7f1673 /chrome/browser/ui/exclusive_access | |
parent | 03b7a204fceb8948d84e36e66b26b9a447a2f51f (diff) | |
download | chromium_src-cae22576c51838b5c32a2d489e8c6187dc3c451f.zip chromium_src-cae22576c51838b5c32a2d489e8c6187dc3c451f.tar.gz chromium_src-cae22576c51838b5c32a2d489e8c6187dc3c451f.tar.bz2 |
Preference for Presentation Mode/Fullscreen Toolbar
Fixes the issue with the test on 10.10 for the commit: https://chromium.googlesource.com/chromium/src/+/048c293643242dc0357c8bc8651d1c251559a400
BUG=544307
Review URL: https://codereview.chromium.org/1650713003
Cr-Commit-Position: refs/heads/master@{#373695}
Diffstat (limited to 'chrome/browser/ui/exclusive_access')
3 files changed, 10 insertions, 9 deletions
diff --git a/chrome/browser/ui/exclusive_access/exclusive_access_context.h b/chrome/browser/ui/exclusive_access/exclusive_access_context.h index 63f10be9..6aedf486 100644 --- a/chrome/browser/ui/exclusive_access/exclusive_access_context.h +++ b/chrome/browser/ui/exclusive_access/exclusive_access_context.h @@ -37,8 +37,8 @@ class ExclusiveAccessContext { // Currently only supported on Mac. virtual void UpdateFullscreenWithToolbar(bool with_toolbar); - // Toggles the toolbar state to be hidden or shown in fullscreen. - // Currently only supported on Mac. + // Toggles the toolbar state to be hidden or shown in fullscreen. Updates + // the preference accordingly. Only supported on Mac. virtual void ToggleFullscreenToolbar(); // Returns true if the window is fullscreen with additional UI elements. See diff --git a/chrome/browser/ui/exclusive_access/fullscreen_controller.cc b/chrome/browser/ui/exclusive_access/fullscreen_controller.cc index fa0f593..95f0d40 100644 --- a/chrome/browser/ui/exclusive_access/fullscreen_controller.cc +++ b/chrome/browser/ui/exclusive_access/fullscreen_controller.cc @@ -436,7 +436,8 @@ void FullscreenController::ToggleFullscreenModeInternal( // FullscreenWithoutChrome and FullscreenWithToolbar. if (exclusive_access_context->IsFullscreen() && !IsWindowFullscreenForTabOrPending() && - exclusive_access_context->SupportsFullscreenWithToolbar()) { + exclusive_access_context->SupportsFullscreenWithToolbar() && + IsExtensionFullscreenOrPending()) { if (option == BROWSER_WITH_TOOLBAR) { enter_fullscreen = enter_fullscreen || !exclusive_access_context->IsFullscreenWithToolbar(); diff --git a/chrome/browser/ui/exclusive_access/fullscreen_controller_state_test.cc b/chrome/browser/ui/exclusive_access/fullscreen_controller_state_test.cc index f7a2f46..a8514c6 100644 --- a/chrome/browser/ui/exclusive_access/fullscreen_controller_state_test.cc +++ b/chrome/browser/ui/exclusive_access/fullscreen_controller_state_test.cc @@ -53,7 +53,7 @@ FullscreenControllerStateTest::FullscreenControllerStateTest() }, { // STATE_BROWSER_FULLSCREEN_NO_CHROME: STATE_TO_NORMAL, // Event TOGGLE_FULLSCREEN - STATE_BROWSER_FULLSCREEN_WITH_CHROME, // Event TOGGLE_FULLSCREEN_CHROME + STATE_TO_NORMAL, // Event TOGGLE_FULLSCREEN_CHROME STATE_TAB_BROWSER_FULLSCREEN, // Event TAB_FULLSCREEN_TRUE STATE_BROWSER_FULLSCREEN_NO_CHROME, // Event TAB_FULLSCREEN_FALSE STATE_METRO_SNAP, // Event METRO_SNAP_TRUE @@ -64,7 +64,7 @@ FullscreenControllerStateTest::FullscreenControllerStateTest() STATE_BROWSER_FULLSCREEN_NO_CHROME, // Event WINDOW_CHANGE }, { // STATE_BROWSER_FULLSCREEN_WITH_CHROME: - STATE_BROWSER_FULLSCREEN_NO_CHROME, // Event TOGGLE_FULLSCREEN + STATE_TO_NORMAL, // Event TOGGLE_FULLSCREEN STATE_TO_NORMAL, // Event TOGGLE_FULLSCREEN_CHROME STATE_TAB_BROWSER_FULLSCREEN_CHROME, // Event TAB_FULLSCREEN_TRUE STATE_BROWSER_FULLSCREEN_WITH_CHROME, // Event TAB_FULLSCREEN_FALSE @@ -124,7 +124,7 @@ FullscreenControllerStateTest::FullscreenControllerStateTest() STATE_TAB_BROWSER_FULLSCREEN_CHROME, // Event WINDOW_CHANGE }, { // STATE_TO_NORMAL: - STATE_TO_NORMAL, // Event TOGGLE_FULLSCREEN + STATE_TO_BROWSER_FULLSCREEN_WITH_CHROME,// Event TOGGLE_FULLSCREEN STATE_TO_BROWSER_FULLSCREEN_WITH_CHROME,// Event TOGGLE_FULLSCREEN_CHROME // TODO(scheib) Should be a route back to TAB. http://crbug.com/154196 STATE_TO_NORMAL, // Event TAB_FULLSCREEN_TRUE @@ -137,8 +137,8 @@ FullscreenControllerStateTest::FullscreenControllerStateTest() STATE_NORMAL, // Event WINDOW_CHANGE }, { // STATE_TO_BROWSER_FULLSCREEN_NO_CHROME: - STATE_TO_BROWSER_FULLSCREEN_NO_CHROME, // Event TOGGLE_FULLSCREEN - STATE_TO_BROWSER_FULLSCREEN_WITH_CHROME,// Event TOGGLE_FULLSCREEN_CHROME + STATE_TO_NORMAL, // Event TOGGLE_FULLSCREEN + STATE_TO_NORMAL, // Event TOGGLE_FULLSCREEN_CHROME // TODO(scheib) Should be a route to TAB_BROWSER http://crbug.com/154196 STATE_TO_BROWSER_FULLSCREEN_NO_CHROME, // Event TAB_FULLSCREEN_TRUE STATE_TO_BROWSER_FULLSCREEN_NO_CHROME, // Event TAB_FULLSCREEN_FALSE @@ -155,7 +155,7 @@ FullscreenControllerStateTest::FullscreenControllerStateTest() STATE_BROWSER_FULLSCREEN_NO_CHROME, // Event WINDOW_CHANGE }, { // STATE_TO_BROWSER_FULLSCREEN_WITH_CHROME: - STATE_TO_BROWSER_FULLSCREEN_NO_CHROME, // Event TOGGLE_FULLSCREEN + STATE_TO_NORMAL, // Event TOGGLE_FULLSCREEN STATE_TO_NORMAL, // Event TOGGLE_FULLSCREEN_CHROME // TODO(scheib) Should be a route to TAB_BROWSER http://crbug.com/154196 STATE_TAB_BROWSER_FULLSCREEN, // Event TAB_FULLSCREEN_TRUE |