| 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 743 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 754 | 754 |
| 755 enteringImmersiveFullscreen_ = NO; | 755 enteringImmersiveFullscreen_ = NO; |
| 756 enteringPresentationMode_ = NO; | 756 enteringPresentationMode_ = NO; |
| 757 | 757 |
| 758 [self resetCustomAppKitFullscreenVariables]; | 758 [self resetCustomAppKitFullscreenVariables]; |
| 759 [[tabStripController_ activeTabContentsController] | 759 [[tabStripController_ activeTabContentsController] |
| 760 updateFullscreenWidgetFrame]; | 760 updateFullscreenWidgetFrame]; |
| 761 | 761 |
| 762 [self showFullscreenExitBubbleIfNecessary]; | 762 [self showFullscreenExitBubbleIfNecessary]; |
| 763 browser_->WindowFullscreenStateChanged(); | 763 browser_->WindowFullscreenStateChanged(); |
| 764 |
| 765 if (fullscreenLowPowerCoordinator_) |
| 766 fullscreenLowPowerCoordinator_->SetInFullscreenTransition(false); |
| 764 } | 767 } |
| 765 | 768 |
| 766 - (void)windowWillExitFullScreen:(NSNotification*)notification { | 769 - (void)windowWillExitFullScreen:(NSNotification*)notification { |
| 770 if (fullscreenLowPowerCoordinator_) |
| 771 fullscreenLowPowerCoordinator_->SetInFullscreenTransition(true); |
| 772 |
| 767 if (notification) // For System Fullscreen when non-nil. | 773 if (notification) // For System Fullscreen when non-nil. |
| 768 [self registerForContentViewResizeNotifications]; | 774 [self registerForContentViewResizeNotifications]; |
| 769 exitingAppKitFullscreen_ = YES; | 775 exitingAppKitFullscreen_ = YES; |
| 770 | 776 |
| 771 // Like windowWillEnterFullScreen, if we use custom animations, | 777 // Like windowWillEnterFullScreen, if we use custom animations, |
| 772 // adjustUIForExitingFullscreen should be called after the layout resizes in | 778 // adjustUIForExitingFullscreen should be called after the layout resizes in |
| 773 // startCustomAnimationToExitFullScreenWithDuration. | 779 // startCustomAnimationToExitFullScreenWithDuration. |
| 774 if (isUsingCustomAnimation_) { | 780 if (isUsingCustomAnimation_) { |
| 775 blockLayoutSubviews_ = YES; | 781 blockLayoutSubviews_ = YES; |
| 776 [self.chromeContentView setAutoresizesSubviews:NO]; | 782 [self.chromeContentView setAutoresizesSubviews:NO]; |
| (...skipping 484 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1261 return nil; | 1267 return nil; |
| 1262 } | 1268 } |
| 1263 | 1269 |
| 1264 - (BOOL)isFullscreenForTabContentOrExtension { | 1270 - (BOOL)isFullscreenForTabContentOrExtension { |
| 1265 FullscreenController* controller = | 1271 FullscreenController* controller = |
| 1266 browser_->exclusive_access_manager()->fullscreen_controller(); | 1272 browser_->exclusive_access_manager()->fullscreen_controller(); |
| 1267 return controller->IsWindowFullscreenForTabOrPending() || | 1273 return controller->IsWindowFullscreenForTabOrPending() || |
| 1268 controller->IsExtensionFullscreenOrPending(); | 1274 controller->IsExtensionFullscreenOrPending(); |
| 1269 } | 1275 } |
| 1270 | 1276 |
| 1277 - (void)windowWillBeginSheet:(NSNotification*)notification { |
| 1278 if (fullscreenLowPowerCoordinator_) |
| 1279 fullscreenLowPowerCoordinator_->SetHasActiveSheet(true); |
| 1280 } |
| 1281 |
| 1282 - (void)windowDidEndSheet:(NSNotification*)notification { |
| 1283 if (fullscreenLowPowerCoordinator_) |
| 1284 fullscreenLowPowerCoordinator_->SetHasActiveSheet(false); |
| 1285 } |
| 1286 |
| 1287 - (void)childWindowsDidChange { |
| 1288 if (fullscreenLowPowerCoordinator_) |
| 1289 fullscreenLowPowerCoordinator_->ChildWindowsChanged(); |
| 1290 } |
| 1291 |
| 1271 @end // @implementation BrowserWindowController(Private) | 1292 @end // @implementation BrowserWindowController(Private) |
| OLD | NEW |