| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 #import "base/auto_reset.h" | 9 #import "base/auto_reset.h" |
| 10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
| (...skipping 834 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 845 } | 845 } |
| 846 | 846 |
| 847 - (void)enableBarVisibilityUpdates { | 847 - (void)enableBarVisibilityUpdates { |
| 848 // Early escape if there's nothing to do. | 848 // Early escape if there's nothing to do. |
| 849 if (barVisibilityUpdatesEnabled_) | 849 if (barVisibilityUpdatesEnabled_) |
| 850 return; | 850 return; |
| 851 | 851 |
| 852 barVisibilityUpdatesEnabled_ = YES; | 852 barVisibilityUpdatesEnabled_ = YES; |
| 853 | 853 |
| 854 if ([barVisibilityLocks_ count]) | 854 if ([barVisibilityLocks_ count]) |
| 855 [fullscreenToolbarController_ ensureOverlayShownWithAnimation:NO]; | 855 [fullscreenToolbarController_ showToolbarIfPossibleWithAnimation:NO]; |
| 856 else | 856 else |
| 857 [fullscreenToolbarController_ ensureOverlayHiddenWithAnimation:NO]; | 857 [fullscreenToolbarController_ hideToolbarIfPossibleWithAnimation:NO]; |
| 858 } | 858 } |
| 859 | 859 |
| 860 - (void)disableBarVisibilityUpdates { | 860 - (void)disableBarVisibilityUpdates { |
| 861 // Early escape if there's nothing to do. | 861 // Early escape if there's nothing to do. |
| 862 if (!barVisibilityUpdatesEnabled_) | 862 if (!barVisibilityUpdatesEnabled_) |
| 863 return; | 863 return; |
| 864 | 864 |
| 865 barVisibilityUpdatesEnabled_ = NO; | 865 barVisibilityUpdatesEnabled_ = NO; |
| 866 [fullscreenToolbarController_ cancelAnimationAndTimer]; | 866 [fullscreenToolbarController_ cancelAnimationAndTimer]; |
| 867 } | 867 } |
| 868 | 868 |
| 869 - (void)hideOverlayIfPossibleWithAnimation:(BOOL)animation { | 869 - (void)hideOverlayIfPossibleWithAnimation:(BOOL)animation { |
| 870 if (!barVisibilityUpdatesEnabled_ || [barVisibilityLocks_ count]) | 870 if (!barVisibilityUpdatesEnabled_ || [barVisibilityLocks_ count]) |
| 871 return; | 871 return; |
| 872 | 872 |
| 873 [fullscreenToolbarController_ ensureOverlayHiddenWithAnimation:animation]; | 873 [fullscreenToolbarController_ hideToolbarIfPossibleWithAnimation:animation]; |
| 874 } | 874 } |
| 875 | 875 |
| 876 - (CGFloat)toolbarDividerOpacity { | 876 - (CGFloat)toolbarDividerOpacity { |
| 877 return [bookmarkBarController_ toolbarDividerOpacity]; | 877 return [bookmarkBarController_ toolbarDividerOpacity]; |
| 878 } | 878 } |
| 879 | 879 |
| 880 - (void)updateInfoBarTipVisibility { | 880 - (void)updateInfoBarTipVisibility { |
| 881 // If there's no toolbar then hide the infobar tip. | 881 // If there's no toolbar then hide the infobar tip. |
| 882 [infoBarContainerController_ | 882 [infoBarContainerController_ |
| 883 setShouldSuppressTopInfoBarTip:![self hasToolbar]]; | 883 setShouldSuppressTopInfoBarTip:![self hasToolbar]]; |
| (...skipping 384 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1268 if (fullscreenLowPowerCoordinator_) | 1268 if (fullscreenLowPowerCoordinator_) |
| 1269 fullscreenLowPowerCoordinator_->SetHasActiveSheet(false); | 1269 fullscreenLowPowerCoordinator_->SetHasActiveSheet(false); |
| 1270 } | 1270 } |
| 1271 | 1271 |
| 1272 - (void)childWindowsDidChange { | 1272 - (void)childWindowsDidChange { |
| 1273 if (fullscreenLowPowerCoordinator_) | 1273 if (fullscreenLowPowerCoordinator_) |
| 1274 fullscreenLowPowerCoordinator_->ChildWindowsChanged(); | 1274 fullscreenLowPowerCoordinator_->ChildWindowsChanged(); |
| 1275 } | 1275 } |
| 1276 | 1276 |
| 1277 @end // @implementation BrowserWindowController(Private) | 1277 @end // @implementation BrowserWindowController(Private) |
| OLD | NEW |