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

Side by Side Diff: chrome/browser/ui/cocoa/browser_window_command_handler.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: 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
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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_window_command_handler.h" 5 #import "chrome/browser/ui/cocoa/browser_window_command_handler.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #import "base/mac/foundation_util.h" 8 #import "base/mac/foundation_util.h"
9 #include "chrome/app/chrome_command_ids.h" 9 #include "chrome/app/chrome_command_ids.h"
10 #import "chrome/browser/app_controller_mac.h" 10 #import "chrome/browser/app_controller_mac.h"
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
48 48
49 // On Windows this logic happens in bookmark_bar_view.cc. This simply updates 49 // On Windows this logic happens in bookmark_bar_view.cc. This simply updates
50 // the menu item; it does not display the bookmark bar itself. 50 // the menu item; it does not display the bookmark bar itself.
51 if (tag == IDC_SHOW_BOOKMARK_BAR) { 51 if (tag == IDC_SHOW_BOOKMARK_BAR) {
52 SetToggleState(browser->window()->IsBookmarkBarVisible(), item); 52 SetToggleState(browser->window()->IsBookmarkBarVisible(), item);
53 return; 53 return;
54 } 54 }
55 55
56 if (tag == IDC_TOGGLE_FULLSCREEN_TOOLBAR) { 56 if (tag == IDC_TOGGLE_FULLSCREEN_TOOLBAR) {
57 PrefService* prefs = browser->profile()->GetPrefs(); 57 PrefService* prefs = browser->profile()->GetPrefs();
58 SetToggleState(prefs->GetBoolean(prefs::kHideFullscreenToolbar), item); 58 SetToggleState(prefs->GetBoolean(prefs::kShowFullscreenToolbar), item);
59 return; 59 return;
60 } 60 }
61 61
62 // Update the checked/unchecked state of items in the encoding menu. 62 // Update the checked/unchecked state of items in the encoding menu.
63 // On Windows, this logic is part of |EncodingMenuModel| in 63 // On Windows, this logic is part of |EncodingMenuModel| in
64 // browser/ui/views/toolbar_view.h. 64 // browser/ui/views/toolbar_view.h.
65 EncodingMenuController encoding_controller; 65 EncodingMenuController encoding_controller;
66 if (!encoding_controller.DoesCommandBelongToEncodingMenu(tag)) 66 if (!encoding_controller.DoesCommandBelongToEncodingMenu(tag))
67 return; 67 return;
68 68
(...skipping 205 matching lines...) Expand 10 before | Expand all | Expand 10 after
274 // the background" in this case. 274 // the background" in this case.
275 modifierFlags &= ~NSCommandKeyMask; 275 modifierFlags &= ~NSCommandKeyMask;
276 } 276 }
277 chrome::ExecuteCommandWithDisposition( 277 chrome::ExecuteCommandWithDisposition(
278 FindBrowserForSender(sender, window), command, 278 FindBrowserForSender(sender, window), command,
279 ui::WindowOpenDispositionFromNSEventWithFlags([NSApp currentEvent], 279 ui::WindowOpenDispositionFromNSEventWithFlags([NSApp currentEvent],
280 modifierFlags)); 280 modifierFlags));
281 } 281 }
282 282
283 @end 283 @end
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698