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

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: 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
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 318 matching lines...) Expand 10 before | Expand all | Expand 10 after
613 610
614 NSWindow* BrowserWindowCocoa::window() const { 611 NSWindow* BrowserWindowCocoa::window() const {
615 return [controller_ window]; 612 return [controller_ window];
616 } 613 }
617 614
618 void BrowserWindowCocoa::UpdateSidebarForContents(TabContents* tab_contents) { 615 void BrowserWindowCocoa::UpdateSidebarForContents(TabContents* tab_contents) {
619 if (tab_contents == browser_->GetSelectedTabContents()) { 616 if (tab_contents == browser_->GetSelectedTabContents()) {
620 [controller_ updateSidebarForContents:tab_contents]; 617 [controller_ updateSidebarForContents:tab_contents];
621 } 618 }
622 } 619 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698