| 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 594 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|   605  |   605  | 
|   606   enteringAppKitFullscreen_ = YES; |   606   enteringAppKitFullscreen_ = YES; | 
|   607   enteringAppKitFullscreenOnPrimaryScreen_ = |   607   enteringAppKitFullscreenOnPrimaryScreen_ = | 
|   608       [[[self window] screen] isEqual:[[NSScreen screens] firstObject]]; |   608       [[[self window] screen] isEqual:[[NSScreen screens] firstObject]]; | 
|   609  |   609  | 
|   610   [self setSheetHiddenForFullscreenTransition:YES]; |   610   [self setSheetHiddenForFullscreenTransition:YES]; | 
|   611   [self adjustUIForEnteringFullscreen]; |   611   [self adjustUIForEnteringFullscreen]; | 
|   612 } |   612 } | 
|   613  |   613  | 
|   614 - (void)windowDidEnterFullScreen:(NSNotification*)notification { |   614 - (void)windowDidEnterFullScreen:(NSNotification*)notification { | 
|   615   [tabStripController_ setVisualEffectsDisabledForFullscreen:YES]; |  | 
|   616  |  | 
|   617   // In Yosemite, some combination of the titlebar and toolbar always show in |   615   // In Yosemite, some combination of the titlebar and toolbar always show in | 
|   618   // full-screen mode. We do not want either to show. Search for the window that |   616   // full-screen mode. We do not want either to show. Search for the window that | 
|   619   // contains the views, and hide it. There is no need to ever unhide the view. |   617   // contains the views, and hide it. There is no need to ever unhide the view. | 
|   620   // http://crbug.com/380235 |   618   // http://crbug.com/380235 | 
|   621   if (base::mac::IsAtLeastOS10_10()) { |   619   if (base::mac::IsAtLeastOS10_10()) { | 
|   622     for (NSWindow* window in [[NSApplication sharedApplication] windows]) { |   620     for (NSWindow* window in [[NSApplication sharedApplication] windows]) { | 
|   623       if ([window |   621       if ([window | 
|   624               isKindOfClass:NSClassFromString(@"NSToolbarFullScreenWindow")]) { |   622               isKindOfClass:NSClassFromString(@"NSToolbarFullScreenWindow")]) { | 
|   625         // Hide the toolbar if it is for a FramedBrowserWindow. |   623         // Hide the toolbar if it is for a FramedBrowserWindow. | 
|   626         if ([window respondsToSelector:@selector(_windowForToolbar)]) { |   624         if ([window respondsToSelector:@selector(_windowForToolbar)]) { | 
| (...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|   673   if (fullscreenLowPowerCoordinator_) |   671   if (fullscreenLowPowerCoordinator_) | 
|   674     fullscreenLowPowerCoordinator_->SetInFullscreenTransition(false); |   672     fullscreenLowPowerCoordinator_->SetInFullscreenTransition(false); | 
|   675  |   673  | 
|   676   if (shouldExitAfterEnteringFullscreen_) { |   674   if (shouldExitAfterEnteringFullscreen_) { | 
|   677     shouldExitAfterEnteringFullscreen_ = NO; |   675     shouldExitAfterEnteringFullscreen_ = NO; | 
|   678     [self exitAppKitFullscreen]; |   676     [self exitAppKitFullscreen]; | 
|   679   } |   677   } | 
|   680 } |   678 } | 
|   681  |   679  | 
|   682 - (void)windowWillExitFullScreen:(NSNotification*)notification { |   680 - (void)windowWillExitFullScreen:(NSNotification*)notification { | 
|   683   [tabStripController_ setVisualEffectsDisabledForFullscreen:NO]; |  | 
|   684  |  | 
|   685   if (fullscreenLowPowerCoordinator_) |   681   if (fullscreenLowPowerCoordinator_) | 
|   686     fullscreenLowPowerCoordinator_->SetInFullscreenTransition(true); |   682     fullscreenLowPowerCoordinator_->SetInFullscreenTransition(true); | 
|   687  |   683  | 
|   688   if (notification)  // For System Fullscreen when non-nil. |   684   if (notification)  // For System Fullscreen when non-nil. | 
|   689     [self registerForContentViewResizeNotifications]; |   685     [self registerForContentViewResizeNotifications]; | 
|   690   exitingAppKitFullscreen_ = YES; |   686   exitingAppKitFullscreen_ = YES; | 
|   691  |   687  | 
|   692   // Like windowWillEnterFullScreen, if we use custom animations, |   688   // Like windowWillEnterFullScreen, if we use custom animations, | 
|   693   // adjustUIForExitingFullscreen should be called after the layout resizes in |   689   // adjustUIForExitingFullscreen should be called after the layout resizes in | 
|   694   // startCustomAnimationToExitFullScreenWithDuration. |   690   // startCustomAnimationToExitFullScreenWithDuration. | 
| (...skipping 483 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  1178   if (fullscreenLowPowerCoordinator_) |  1174   if (fullscreenLowPowerCoordinator_) | 
|  1179     fullscreenLowPowerCoordinator_->SetHasActiveSheet(false); |  1175     fullscreenLowPowerCoordinator_->SetHasActiveSheet(false); | 
|  1180 } |  1176 } | 
|  1181  |  1177  | 
|  1182 - (void)childWindowsDidChange { |  1178 - (void)childWindowsDidChange { | 
|  1183   if (fullscreenLowPowerCoordinator_) |  1179   if (fullscreenLowPowerCoordinator_) | 
|  1184     fullscreenLowPowerCoordinator_->ChildWindowsChanged(); |  1180     fullscreenLowPowerCoordinator_->ChildWindowsChanged(); | 
|  1185 } |  1181 } | 
|  1186  |  1182  | 
|  1187 @end  // @implementation BrowserWindowController(Private) |  1183 @end  // @implementation BrowserWindowController(Private) | 
| OLD | NEW |