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

Side by Side Diff: chrome/browser/ui/browser_commands_mac.cc

Issue 1737413002: Modified the behavior of "Hide Toolbar in Full Screen" (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Feb -> March Created 4 years, 9 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
« no previous file with comments | « chrome/browser/prefs/browser_prefs.cc ('k') | chrome/browser/ui/browser_ui_prefs.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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 #include "chrome/browser/ui/browser_commands_mac.h" 5 #include "chrome/browser/ui/browser_commands_mac.h"
6 6
7 #include "base/command_line.h"
8 #include "chrome/browser/fullscreen.h" 7 #include "chrome/browser/fullscreen.h"
8 #include "chrome/browser/profiles/profile.h"
9 #include "chrome/browser/ui/browser.h" 9 #include "chrome/browser/ui/browser.h"
10 #include "chrome/browser/ui/browser_commands.h" 10 #include "chrome/browser/ui/browser_commands.h"
11 #include "chrome/browser/ui/exclusive_access/exclusive_access_context.h"
12 #include "chrome/browser/ui/exclusive_access/fullscreen_controller.h" 11 #include "chrome/browser/ui/exclusive_access/fullscreen_controller.h"
13 #include "chrome/common/chrome_switches.h" 12 #include "chrome/common/pref_names.h"
13 #include "components/prefs/pref_service.h"
14 14
15 namespace chrome { 15 namespace chrome {
16 16
17 void ToggleFullscreenWithToolbarOrFallback(Browser* browser) { 17 void ToggleFullscreenWithToolbarOrFallback(Browser* browser) {
18 DCHECK(browser); 18 DCHECK(browser);
19 if (chrome::mac::SupportsSystemFullscreen()) 19 if (mac::SupportsSystemFullscreen())
20 browser->exclusive_access_manager() 20 browser->exclusive_access_manager()
21 ->fullscreen_controller() 21 ->fullscreen_controller()
22 ->ToggleBrowserFullscreenWithToolbar(); 22 ->ToggleBrowserFullscreenWithToolbar();
23 else 23 else
24 ToggleFullscreenMode(browser); 24 ToggleFullscreenMode(browser);
25 } 25 }
26 26
27 void ToggleFullscreenToolbar(Browser* browser) { 27 void ToggleFullscreenToolbar(Browser* browser) {
28 DCHECK(browser); 28 DCHECK(browser);
29 browser->exclusive_access_manager()->context()->ToggleFullscreenToolbar(); 29
30 // Toggle the value of the preference.
31 PrefService* prefs = browser->profile()->GetPrefs();
32 bool show_toolbar = prefs->GetBoolean(prefs::kShowFullscreenToolbar);
33 prefs->SetBoolean(prefs::kShowFullscreenToolbar, !show_toolbar);
30 } 34 }
31 35
32 } // namespace chrome 36 } // namespace chrome
OLDNEW
« no previous file with comments | « chrome/browser/prefs/browser_prefs.cc ('k') | chrome/browser/ui/browser_ui_prefs.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698