| Index: chrome/browser/ui/cocoa/browser_window_controller_private.mm
|
| diff --git a/chrome/browser/ui/cocoa/browser_window_controller_private.mm b/chrome/browser/ui/cocoa/browser_window_controller_private.mm
|
| index b6ce3acc059d881b2597ef04cee0481b18c728ad..1c9c69e72106d753329d9b5b305f05c81ced564f 100644
|
| --- a/chrome/browser/ui/cocoa/browser_window_controller_private.mm
|
| +++ b/chrome/browser/ui/cocoa/browser_window_controller_private.mm
|
| @@ -1195,14 +1195,20 @@ - (NSArray*)customWindowsToEnterFullScreenForWindow:(NSWindow*)window {
|
| if (![self shouldUseCustomAppKitFullscreenTransition:YES])
|
| return nil;
|
|
|
| - WebContents* webContents = [self webContents];
|
| NSWindow* lowPowerWindow = nil;
|
| - if (webContents) {
|
| - fullscreenLowPowerCoordinator_.reset(new FullscreenLowPowerCoordinatorCocoa(
|
| - [self window],
|
| - webContents->GetRenderWidgetHostView()->GetAcceleratedWidgetMac()));
|
| - lowPowerWindow =
|
| - fullscreenLowPowerCoordinator_->GetFullscreenLowPowerWindow();
|
| + static const bool fullscreen_low_power_enabled_at_command_line =
|
| + base::CommandLine::ForCurrentProcess()->HasSwitch(
|
| + switches::kEnableFullscreenLowPowerMode);
|
| + if (fullscreen_low_power_enabled_at_command_line) {
|
| + WebContents* webContents = [self webContents];
|
| + if (webContents && webContents->GetRenderWidgetHostView()) {
|
| + fullscreenLowPowerCoordinator_.reset(
|
| + new FullscreenLowPowerCoordinatorCocoa(
|
| + [self window], webContents->GetRenderWidgetHostView()
|
| + ->GetAcceleratedWidgetMac()));
|
| + lowPowerWindow =
|
| + fullscreenLowPowerCoordinator_->GetFullscreenLowPowerWindow();
|
| + }
|
| }
|
|
|
| fullscreenTransition_.reset(
|
|
|