OLD | NEW |
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 Loading... |
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 Loading... |
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 } |
OLD | NEW |