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

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

Issue 2532233002: mac: Don't allow animations on FullscreenLowPowerWindow. (Closed)
Patch Set: Created 4 years 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 | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 #include "chrome/browser/ui/cocoa/fullscreen_low_power_coordinator.h" 5 #include "chrome/browser/ui/cocoa/fullscreen_low_power_coordinator.h"
6 6
7 #include "ui/base/cocoa/animation_utils.h" 7 #include "ui/base/cocoa/animation_utils.h"
8 #include "ui/gfx/mac/scoped_cocoa_disable_screen_updates.h" 8 #include "ui/gfx/mac/scoped_cocoa_disable_screen_updates.h"
9 9
10 namespace { 10 namespace {
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
59 ui::AcceleratedWidgetMac* widget) 59 ui::AcceleratedWidgetMac* widget)
60 : content_window_(content_window, base::scoped_policy::RETAIN), 60 : content_window_(content_window, base::scoped_policy::RETAIN),
61 widget_(widget) { 61 widget_(widget) {
62 if (widget_) { 62 if (widget_) {
63 widget_->SetFullscreenLowPowerCoordinator(this); 63 widget_->SetFullscreenLowPowerCoordinator(this);
64 CALayer* fullscreen_low_power_layer = widget_->GetFullscreenLowPowerLayer(); 64 CALayer* fullscreen_low_power_layer = widget_->GetFullscreenLowPowerLayer();
65 if (fullscreen_low_power_layer) { 65 if (fullscreen_low_power_layer) {
66 low_power_window_.reset([[FullscreenLowPowerWindow alloc] 66 low_power_window_.reset([[FullscreenLowPowerWindow alloc]
67 initWithEventTargetWindow:content_window_ 67 initWithEventTargetWindow:content_window_
68 withLayer:fullscreen_low_power_layer]); 68 withLayer:fullscreen_low_power_layer]);
69 [low_power_window_ setAnimationBehavior:NSWindowAnimationBehaviorNone];
69 } 70 }
70 } 71 }
71 72
72 SetHasActiveSheet([content_window_ attachedSheet]); 73 SetHasActiveSheet([content_window_ attachedSheet]);
73 ChildWindowsChanged(); 74 ChildWindowsChanged();
74 } 75 }
75 76
76 FullscreenLowPowerCoordinatorCocoa::~FullscreenLowPowerCoordinatorCocoa() { 77 FullscreenLowPowerCoordinatorCocoa::~FullscreenLowPowerCoordinatorCocoa() {
77 if (widget_) 78 if (widget_)
78 widget_->ResetFullscreenLowPowerCoordinator(); 79 widget_->ResetFullscreenLowPowerCoordinator();
(...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after
216 } 217 }
217 } else { 218 } else {
218 // Move behind the main window. 219 // Move behind the main window.
219 state_ = Disabled; 220 state_ = Disabled;
220 [low_power_window_ orderWindow:NSWindowBelow 221 [low_power_window_ orderWindow:NSWindowBelow
221 relativeTo:[content_window_ windowNumber]]; 222 relativeTo:[content_window_ windowNumber]];
222 } 223 }
223 break; 224 break;
224 } 225 }
225 } 226 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698