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/wm/window_animations.h" | 7 #include "ash/wm/window_animations.h" |
8 #include "ash/wm/window_util.h" | 8 #include "ash/wm/window_util.h" |
9 #include "base/auto_reset.h" | 9 #include "base/auto_reset.h" |
10 #include "ui/aura/window.h" | 10 #include "ui/aura/window.h" |
11 #include "ui/compositor/layer.h" | 11 #include "ui/compositor/layer.h" |
12 #include "ui/compositor/scoped_layer_animation_settings.h" | 12 #include "ui/compositor/scoped_layer_animation_settings.h" |
13 #include "ui/views/background.h" | 13 #include "ui/views/background.h" |
14 #include "ui/views/widget/widget.h" | 14 #include "ui/views/widget/widget.h" |
15 #include "ui/wm/core/window_animations.h" | 15 #include "ui/wm/core/window_animations.h" |
16 #include "ui/wm/core/window_util.h" | 16 #include "ui/wm/core/window_util.h" |
17 | 17 |
18 namespace ash { | 18 namespace ash { |
19 | |
20 namespace internal { | |
21 | |
22 namespace { | 19 namespace { |
23 | 20 |
24 // The opacity of the backdrop. | 21 // The opacity of the backdrop. |
25 const float kBackdropOpacity = 0.5f; | 22 const float kBackdropOpacity = 0.5f; |
26 | 23 |
27 } // namespace | 24 } // namespace |
28 | 25 |
29 WorkspaceBackdropDelegate::WorkspaceBackdropDelegate(aura::Window* container) | 26 WorkspaceBackdropDelegate::WorkspaceBackdropDelegate(aura::Window* container) |
30 : background_(NULL), | 27 : background_(NULL), |
31 container_(container), | 28 container_(container), |
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
142 } | 139 } |
143 | 140 |
144 void WorkspaceBackdropDelegate::Show() { | 141 void WorkspaceBackdropDelegate::Show() { |
145 background_->GetNativeView()->layer()->SetOpacity(0.0f); | 142 background_->GetNativeView()->layer()->SetOpacity(0.0f); |
146 background_->Show(); | 143 background_->Show(); |
147 ui::ScopedLayerAnimationSettings settings( | 144 ui::ScopedLayerAnimationSettings settings( |
148 background_->GetNativeView()->layer()->GetAnimator()); | 145 background_->GetNativeView()->layer()->GetAnimator()); |
149 background_->GetNativeView()->layer()->SetOpacity(kBackdropOpacity); | 146 background_->GetNativeView()->layer()->SetOpacity(kBackdropOpacity); |
150 } | 147 } |
151 | 148 |
152 } // namespace internal | |
153 } // namespace ash | 149 } // namespace ash |
OLD | NEW |