OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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/maximize_mode/workspace_backdrop_delegate.h" | 5 #include "ash/wm/maximize_mode/workspace_backdrop_delegate.h" |
6 | 6 |
7 #include "ash/common/wm/workspace/workspace_layout_manager_backdrop_delegate.h" | 7 #include "ash/common/wm/workspace/workspace_layout_manager_backdrop_delegate.h" |
8 #include "ash/wm/window_animations.h" | 8 #include "ash/wm/window_animations.h" |
9 #include "ash/wm/window_util.h" | 9 #include "ash/wm/window_util.h" |
10 #include "base/auto_reset.h" | 10 #include "base/auto_reset.h" |
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
76 } | 76 } |
77 | 77 |
78 WorkspaceBackdropDelegate::~WorkspaceBackdropDelegate() { | 78 WorkspaceBackdropDelegate::~WorkspaceBackdropDelegate() { |
79 container_->RemoveObserver(container_observer_.get()); | 79 container_->RemoveObserver(container_observer_.get()); |
80 ::wm::ScopedHidingAnimationSettings hiding_settings( | 80 ::wm::ScopedHidingAnimationSettings hiding_settings( |
81 background_->GetNativeView()); | 81 background_->GetNativeView()); |
82 background_->Close(); | 82 background_->Close(); |
83 background_->GetNativeView()->layer()->SetOpacity(0.0f); | 83 background_->GetNativeView()->layer()->SetOpacity(0.0f); |
84 } | 84 } |
85 | 85 |
86 void WorkspaceBackdropDelegate::OnWindowAddedToLayout(wm::WmWindow* child) { | 86 void WorkspaceBackdropDelegate::OnWindowAddedToLayout(WmWindow* child) { |
87 RestackBackdrop(); | 87 RestackBackdrop(); |
88 } | 88 } |
89 | 89 |
90 void WorkspaceBackdropDelegate::OnWindowRemovedFromLayout(wm::WmWindow* child) { | 90 void WorkspaceBackdropDelegate::OnWindowRemovedFromLayout(WmWindow* child) { |
91 RestackBackdrop(); | 91 RestackBackdrop(); |
92 } | 92 } |
93 | 93 |
94 void WorkspaceBackdropDelegate::OnChildWindowVisibilityChanged( | 94 void WorkspaceBackdropDelegate::OnChildWindowVisibilityChanged(WmWindow* child, |
95 wm::WmWindow* child, | 95 bool visible) { |
96 bool visible) { | |
97 RestackBackdrop(); | 96 RestackBackdrop(); |
98 } | 97 } |
99 | 98 |
100 void WorkspaceBackdropDelegate::OnWindowStackingChanged(wm::WmWindow* window) { | 99 void WorkspaceBackdropDelegate::OnWindowStackingChanged(WmWindow* window) { |
101 RestackBackdrop(); | 100 RestackBackdrop(); |
102 } | 101 } |
103 | 102 |
104 void WorkspaceBackdropDelegate::OnPostWindowStateTypeChange( | 103 void WorkspaceBackdropDelegate::OnPostWindowStateTypeChange( |
105 wm::WindowState* window_state, | 104 wm::WindowState* window_state, |
106 wm::WindowStateType old_type) { | 105 wm::WindowStateType old_type) { |
107 RestackBackdrop(); | 106 RestackBackdrop(); |
108 } | 107 } |
109 | 108 |
110 void WorkspaceBackdropDelegate::OnDisplayWorkAreaInsetsChanged() { | 109 void WorkspaceBackdropDelegate::OnDisplayWorkAreaInsetsChanged() { |
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
171 | 170 |
172 void WorkspaceBackdropDelegate::Show() { | 171 void WorkspaceBackdropDelegate::Show() { |
173 background_->GetNativeView()->layer()->SetOpacity(0.0f); | 172 background_->GetNativeView()->layer()->SetOpacity(0.0f); |
174 background_->Show(); | 173 background_->Show(); |
175 ui::ScopedLayerAnimationSettings settings( | 174 ui::ScopedLayerAnimationSettings settings( |
176 background_->GetNativeView()->layer()->GetAnimator()); | 175 background_->GetNativeView()->layer()->GetAnimator()); |
177 background_->GetNativeView()->layer()->SetOpacity(kBackdropOpacity); | 176 background_->GetNativeView()->layer()->SetOpacity(kBackdropOpacity); |
178 } | 177 } |
179 | 178 |
180 } // namespace ash | 179 } // namespace ash |
OLD | NEW |