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 #import "chrome/browser/ui/cocoa/browser_window_controller_private.h" | 5 #import "chrome/browser/ui/cocoa/browser_window_controller_private.h" |
6 | 6 |
7 #include <cmath> | 7 #include <cmath> |
8 | 8 |
9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
10 #import "base/memory/scoped_nsobject.h" | 10 #import "base/memory/scoped_nsobject.h" |
(...skipping 527 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
538 } | 538 } |
539 | 539 |
540 - (BOOL)shouldShowBookmarkBar { | 540 - (BOOL)shouldShowBookmarkBar { |
541 DCHECK(browser_.get()); | 541 DCHECK(browser_.get()); |
542 return browser_->profile()->GetPrefs()->GetBoolean(prefs::kShowBookmarkBar) ? | 542 return browser_->profile()->GetPrefs()->GetBoolean(prefs::kShowBookmarkBar) ? |
543 YES : NO; | 543 YES : NO; |
544 } | 544 } |
545 | 545 |
546 - (BOOL)shouldShowDetachedBookmarkBar { | 546 - (BOOL)shouldShowDetachedBookmarkBar { |
547 // NTP4 never detaches the bookmark bar. | 547 // NTP4 never detaches the bookmark bar. |
548 if (NewTabUI::Ntp4Enabled()) | 548 if (NewTabUI::NTP4Enabled()) |
549 return NO; | 549 return NO; |
550 | 550 |
551 DCHECK(browser_.get()); | 551 DCHECK(browser_.get()); |
552 TabContentsWrapper* tab = browser_->GetSelectedTabContentsWrapper(); | 552 TabContentsWrapper* tab = browser_->GetSelectedTabContentsWrapper(); |
553 return (tab && tab->bookmark_tab_helper()->ShouldShowBookmarkBar() && | 553 return (tab && tab->bookmark_tab_helper()->ShouldShowBookmarkBar() && |
554 ![previewableContentsController_ isShowingPreview]); | 554 ![previewableContentsController_ isShowingPreview]); |
555 } | 555 } |
556 | 556 |
557 - (void)adjustToolbarAndBookmarkBarForCompression:(CGFloat)compression { | 557 - (void)adjustToolbarAndBookmarkBarForCompression:(CGFloat)compression { |
558 CGFloat newHeight = | 558 CGFloat newHeight = |
(...skipping 314 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
873 - (void)disableBarVisibilityUpdates { | 873 - (void)disableBarVisibilityUpdates { |
874 // Early escape if there's nothing to do. | 874 // Early escape if there's nothing to do. |
875 if (!barVisibilityUpdatesEnabled_) | 875 if (!barVisibilityUpdatesEnabled_) |
876 return; | 876 return; |
877 | 877 |
878 barVisibilityUpdatesEnabled_ = NO; | 878 barVisibilityUpdatesEnabled_ = NO; |
879 [presentationModeController_ cancelAnimationAndTimers]; | 879 [presentationModeController_ cancelAnimationAndTimers]; |
880 } | 880 } |
881 | 881 |
882 @end // @implementation BrowserWindowController(Private) | 882 @end // @implementation BrowserWindowController(Private) |
OLD | NEW |