OLD | NEW |
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 "ui/wm/core/shadow_controller.h" | 5 #include "ui/wm/core/shadow_controller.h" |
6 | 6 |
7 #include <utility> | 7 #include <utility> |
8 | 8 |
9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
10 #include "base/logging.h" | 10 #include "base/logging.h" |
11 #include "base/macros.h" | 11 #include "base/macros.h" |
12 #include "base/scoped_observer.h" | 12 #include "base/scoped_observer.h" |
13 #include "ui/aura/client/aura_constants.h" | 13 #include "ui/aura/client/aura_constants.h" |
14 #include "ui/aura/env.h" | 14 #include "ui/aura/env.h" |
15 #include "ui/aura/env_observer.h" | 15 #include "ui/aura/env_observer.h" |
16 #include "ui/aura/window.h" | 16 #include "ui/aura/window.h" |
17 #include "ui/aura/window_observer.h" | 17 #include "ui/aura/window_observer.h" |
18 #include "ui/aura/window_property.h" | 18 #include "ui/base/class_property.h" |
19 #include "ui/base/ui_base_types.h" | 19 #include "ui/base/ui_base_types.h" |
20 #include "ui/compositor/layer.h" | 20 #include "ui/compositor/layer.h" |
21 #include "ui/wm/core/shadow.h" | 21 #include "ui/wm/core/shadow.h" |
22 #include "ui/wm/core/shadow_types.h" | 22 #include "ui/wm/core/shadow_types.h" |
23 #include "ui/wm/core/window_util.h" | 23 #include "ui/wm/core/window_util.h" |
24 #include "ui/wm/public/activation_client.h" | 24 #include "ui/wm/public/activation_client.h" |
25 | 25 |
26 using std::make_pair; | 26 using std::make_pair; |
27 | 27 |
28 DECLARE_WINDOW_PROPERTY_TYPE(wm::Shadow*); | 28 DECLARE_CLASS_PROPERTY_TYPE(::wm::Shadow*); |
29 DEFINE_OWNED_WINDOW_PROPERTY_KEY(wm::Shadow, kShadowLayerKey, nullptr); | 29 DEFINE_OWNED_CLASS_PROPERTY_KEY(::wm::Shadow, kShadowLayerKey, nullptr); |
30 | 30 |
31 namespace wm { | 31 namespace wm { |
32 | 32 |
33 namespace { | 33 namespace { |
34 | 34 |
35 constexpr ShadowElevation kActiveNormalShadowElevation = ShadowElevation::LARGE; | 35 constexpr ShadowElevation kActiveNormalShadowElevation = ShadowElevation::LARGE; |
36 constexpr ShadowElevation kInactiveNormalShadowElevation = | 36 constexpr ShadowElevation kInactiveNormalShadowElevation = |
37 ShadowElevation::MEDIUM; | 37 ShadowElevation::MEDIUM; |
38 | 38 |
39 ShadowElevation GetDefaultShadowElevationForWindow(aura::Window* window) { | 39 ShadowElevation GetDefaultShadowElevationForWindow(aura::Window* window) { |
(...skipping 227 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
267 activation_client_->RemoveObserver(this); | 267 activation_client_->RemoveObserver(this); |
268 } | 268 } |
269 | 269 |
270 void ShadowController::OnWindowActivated(ActivationReason reason, | 270 void ShadowController::OnWindowActivated(ActivationReason reason, |
271 aura::Window* gained_active, | 271 aura::Window* gained_active, |
272 aura::Window* lost_active) { | 272 aura::Window* lost_active) { |
273 impl_->OnWindowActivated(reason, gained_active, lost_active); | 273 impl_->OnWindowActivated(reason, gained_active, lost_active); |
274 } | 274 } |
275 | 275 |
276 } // namespace wm | 276 } // namespace wm |
OLD | NEW |