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

Side by Side Diff: chrome/browser/ui/cocoa/browser_window_controller_private.mm

Issue 2040253003: Mac low power video: Support child windows, sheets, and transitions (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 6 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
« no previous file with comments | « no previous file | chrome/browser/ui/cocoa/framed_browser_window.mm » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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);
spqchan 2016/06/07 22:30:32 Why aren't we setting it to true in windowWillEnte
ccameron 2016/06/07 23:12:50 Good point -- updated.
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
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)
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/ui/cocoa/framed_browser_window.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698