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

Side by Side Diff: chrome/browser/ui/cocoa/browser/exclusive_access_controller_views.mm

Issue 1737413002: Modified the behavior of "Hide Toolbar in Full Screen" (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 10 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 unified diff | Download patch
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #import "chrome/browser/ui/cocoa/browser/exclusive_access_controller_views.h" 5 #import "chrome/browser/ui/cocoa/browser/exclusive_access_controller_views.h"
6 6
7 #include "chrome/browser/download/download_shelf.h" 7 #include "chrome/browser/download/download_shelf.h"
8 #include "chrome/browser/fullscreen.h" 8 #include "chrome/browser/fullscreen.h"
9 #include "chrome/browser/ui/browser_window.h" 9 #include "chrome/browser/ui/browser_window.h"
10 #include "chrome/browser/ui/cocoa/accelerators_cocoa.h" 10 #include "chrome/browser/ui/cocoa/accelerators_cocoa.h"
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
66 } 66 }
67 67
68 bool ExclusiveAccessController::SupportsFullscreenWithToolbar() const { 68 bool ExclusiveAccessController::SupportsFullscreenWithToolbar() const {
69 return chrome::mac::SupportsSystemFullscreen(); 69 return chrome::mac::SupportsSystemFullscreen();
70 } 70 }
71 71
72 void ExclusiveAccessController::UpdateFullscreenWithToolbar(bool with_toolbar) { 72 void ExclusiveAccessController::UpdateFullscreenWithToolbar(bool with_toolbar) {
73 [controller_ updateFullscreenWithToolbar:with_toolbar]; 73 [controller_ updateFullscreenWithToolbar:with_toolbar];
74 } 74 }
75 75
76 void ExclusiveAccessController::ToggleFullscreenToolbar() { 76 void ExclusiveAccessController::UpdateFullscreenToolbar() {
77 PrefService* prefs = browser_->profile()->GetPrefs(); 77 PrefService* prefs = browser_->profile()->GetPrefs();
78 bool hideToolbar = !prefs->GetBoolean(prefs::kHideFullscreenToolbar); 78 bool hideToolbar = !prefs->GetBoolean(prefs::kShowFullscreenToolbar);
79 [controller_ setFullscreenToolbarHidden:hideToolbar]; 79 [controller_ setFullscreenToolbarHidden:hideToolbar];
80 prefs->SetBoolean(prefs::kHideFullscreenToolbar, hideToolbar);
81 } 80 }
82 81
83 bool ExclusiveAccessController::IsFullscreenWithToolbar() const { 82 bool ExclusiveAccessController::IsFullscreenWithToolbar() const {
84 return IsFullscreen() && ![controller_ inPresentationMode]; 83 return IsFullscreen() && ![controller_ inPresentationMode];
85 } 84 }
86 85
87 // See the Fullscreen terminology section and the (Fullscreen) interface 86 // See the Fullscreen terminology section and the (Fullscreen) interface
88 // category in browser_window_controller.h for a detailed explanation of the 87 // category in browser_window_controller.h for a detailed explanation of the
89 // logic in this method. 88 // logic in this method.
90 void ExclusiveAccessController::EnterFullscreen( 89 void ExclusiveAccessController::EnterFullscreen(
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after
176 } 175 }
177 176
178 gfx::Rect ExclusiveAccessController::GetTopContainerBoundsInScreen() { 177 gfx::Rect ExclusiveAccessController::GetTopContainerBoundsInScreen() {
179 NOTREACHED(); // Only used for ImmersiveMode. 178 NOTREACHED(); // Only used for ImmersiveMode.
180 return gfx::Rect(); 179 return gfx::Rect();
181 } 180 }
182 181
183 BrowserWindow* ExclusiveAccessController::GetBrowserWindow() const { 182 BrowserWindow* ExclusiveAccessController::GetBrowserWindow() const {
184 return [controller_ browserWindow]; 183 return [controller_ browserWindow];
185 } 184 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698