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

Side by Side Diff: ash/wm/workspace_controller.cc

Issue 2887103002: Revert of Refactor backdrop (Closed)
Patch Set: Created 3 years, 7 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
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 #include "ash/wm/workspace_controller.h" 5 #include "ash/wm/workspace_controller.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "ash/public/cpp/shell_window_ids.h" 9 #include "ash/public/cpp/shell_window_ids.h"
10 #include "ash/root_window_controller.h" 10 #include "ash/root_window_controller.h"
11 #include "ash/shelf/wm_shelf.h" 11 #include "ash/shelf/wm_shelf.h"
12 #include "ash/shell_port.h" 12 #include "ash/shell_port.h"
13 #include "ash/wm/fullscreen_window_finder.h" 13 #include "ash/wm/fullscreen_window_finder.h"
14 #include "ash/wm/window_state.h" 14 #include "ash/wm/window_state.h"
15 #include "ash/wm/window_state_aura.h" 15 #include "ash/wm/window_state_aura.h"
16 #include "ash/wm/wm_window_animations.h" 16 #include "ash/wm/wm_window_animations.h"
17 #include "ash/wm/workspace/backdrop_controller.h"
18 #include "ash/wm/workspace/backdrop_delegate.h"
19 #include "ash/wm/workspace/workspace_event_handler.h" 17 #include "ash/wm/workspace/workspace_event_handler.h"
20 #include "ash/wm/workspace/workspace_layout_manager.h" 18 #include "ash/wm/workspace/workspace_layout_manager.h"
19 #include "ash/wm/workspace/workspace_layout_manager_backdrop_delegate.h"
21 #include "ash/wm_window.h" 20 #include "ash/wm_window.h"
22 #include "ui/aura/window.h" 21 #include "ui/aura/window.h"
23 #include "ui/compositor/layer.h" 22 #include "ui/compositor/layer.h"
24 #include "ui/compositor/scoped_layer_animation_settings.h" 23 #include "ui/compositor/scoped_layer_animation_settings.h"
25 24
26 namespace ash { 25 namespace ash {
27 namespace { 26 namespace {
28 27
29 // Amount of time to pause before animating anything. Only used during initial 28 // Amount of time to pause before animating anything. Only used during initial
30 // animation (when logging in). 29 // animation (when logging in).
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
105 ui::LayerAnimationElement::BRIGHTNESS | 104 ui::LayerAnimationElement::BRIGHTNESS |
106 ui::LayerAnimationElement::VISIBILITY); 105 ui::LayerAnimationElement::VISIBILITY);
107 settings.SetTweenType(gfx::Tween::EASE_OUT); 106 settings.SetTweenType(gfx::Tween::EASE_OUT);
108 settings.SetTransitionDuration( 107 settings.SetTransitionDuration(
109 base::TimeDelta::FromMilliseconds(kInitialAnimationDurationMS)); 108 base::TimeDelta::FromMilliseconds(kInitialAnimationDurationMS));
110 layer->SetTransform(gfx::Transform()); 109 layer->SetTransform(gfx::Transform());
111 layer->SetOpacity(1.0f); 110 layer->SetOpacity(1.0f);
112 } 111 }
113 } 112 }
114 113
115 void WorkspaceController::SetBackdropDelegate( 114 void WorkspaceController::SetMaximizeBackdropDelegate(
116 std::unique_ptr<BackdropDelegate> delegate) { 115 std::unique_ptr<WorkspaceLayoutManagerBackdropDelegate> delegate) {
117 layout_manager_->SetBackdropDelegate(std::move(delegate)); 116 layout_manager_->SetMaximizeBackdropDelegate(std::move(delegate));
118 } 117 }
119 118
120 void WorkspaceController::OnWindowDestroying(aura::Window* window) { 119 void WorkspaceController::OnWindowDestroying(aura::Window* window) {
121 DCHECK_EQ(window, viewport_); 120 DCHECK_EQ(window, viewport_);
122 viewport_->RemoveObserver(this); 121 viewport_->RemoveObserver(this);
123 viewport_ = nullptr; 122 viewport_ = nullptr;
124 // Destroy |event_handler_| too as it depends upon |window|. 123 // Destroy |event_handler_| too as it depends upon |window|.
125 event_handler_.reset(); 124 event_handler_.reset();
126 layout_manager_ = nullptr; 125 layout_manager_ = nullptr;
127 } 126 }
128 127
129 } // namespace ash 128 } // namespace ash
OLDNEW
« no previous file with comments | « ash/wm/workspace_controller.h ('k') | chrome/browser/chromeos/arc/accessibility/arc_accessibility_helper_bridge_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698