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

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

Issue 7564011: Prevent accelerators from toggling the bookmark bar when disabled by policy. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Reviewed, rebased Created 9 years, 4 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 | Annotate | Revision Log
« no previous file with comments | « chrome/browser/ui/browser.cc ('k') | chrome/browser/ui/gtk/browser_window_gtk.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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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/cocoa/browser_window_cocoa.h" 5 #include "chrome/browser/ui/cocoa/browser_window_cocoa.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/logging.h" 8 #include "base/logging.h"
9 #include "base/message_loop.h" 9 #include "base/message_loop.h"
10 #include "base/sys_string_conversions.h" 10 #include "base/sys_string_conversions.h"
(...skipping 260 matching lines...) Expand 10 before | Expand all | Expand 10 after
271 271
272 void BrowserWindowCocoa::FocusBookmarksToolbar() { 272 void BrowserWindowCocoa::FocusBookmarksToolbar() {
273 // Not needed on the Mac. 273 // Not needed on the Mac.
274 } 274 }
275 275
276 void BrowserWindowCocoa::FocusChromeOSStatus() { 276 void BrowserWindowCocoa::FocusChromeOSStatus() {
277 // Not needed on the Mac. 277 // Not needed on the Mac.
278 } 278 }
279 279
280 bool BrowserWindowCocoa::IsBookmarkBarVisible() const { 280 bool BrowserWindowCocoa::IsBookmarkBarVisible() const {
281 return (browser_->profile()->GetPrefs()->GetBoolean( 281 return browser_->profile()->GetPrefs()->GetBoolean(prefs::kShowBookmarkBar);
282 prefs::kShowBookmarkBar) &&
283 browser_->profile()->GetPrefs()->GetBoolean(
284 prefs::kEnableBookmarkBar));
285 } 282 }
286 283
287 bool BrowserWindowCocoa::IsBookmarkBarAnimating() const { 284 bool BrowserWindowCocoa::IsBookmarkBarAnimating() const {
288 return [controller_ isBookmarkBarAnimating]; 285 return [controller_ isBookmarkBarAnimating];
289 } 286 }
290 287
291 bool BrowserWindowCocoa::IsTabStripEditable() const { 288 bool BrowserWindowCocoa::IsTabStripEditable() const {
292 return ![controller_ isDragSessionActive]; 289 return ![controller_ isDragSessionActive];
293 } 290 }
294 291
(...skipping 326 matching lines...) Expand 10 before | Expand all | Expand 10 after
621 618
622 NSWindow* BrowserWindowCocoa::window() const { 619 NSWindow* BrowserWindowCocoa::window() const {
623 return [controller_ window]; 620 return [controller_ window];
624 } 621 }
625 622
626 void BrowserWindowCocoa::UpdateSidebarForContents(TabContents* tab_contents) { 623 void BrowserWindowCocoa::UpdateSidebarForContents(TabContents* tab_contents) {
627 if (tab_contents == browser_->GetSelectedTabContents()) { 624 if (tab_contents == browser_->GetSelectedTabContents()) {
628 [controller_ updateSidebarForContents:tab_contents]; 625 [controller_ updateSidebarForContents:tab_contents];
629 } 626 }
630 } 627 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/browser.cc ('k') | chrome/browser/ui/gtk/browser_window_gtk.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698