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" |
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
90 // EnvObserver). | 90 // EnvObserver). |
91 class ShadowController::Impl : | 91 class ShadowController::Impl : |
92 public aura::EnvObserver, | 92 public aura::EnvObserver, |
93 public aura::WindowObserver, | 93 public aura::WindowObserver, |
94 public base::RefCounted<Impl> { | 94 public base::RefCounted<Impl> { |
95 public: | 95 public: |
96 // Returns the singleton instance, destroyed when there are no more refs. | 96 // Returns the singleton instance, destroyed when there are no more refs. |
97 static Impl* GetInstance(); | 97 static Impl* GetInstance(); |
98 | 98 |
99 // aura::EnvObserver override: | 99 // aura::EnvObserver override: |
100 virtual void OnWindowInitialized(aura::Window* window) OVERRIDE; | 100 virtual void OnWindowInitialized(aura::Window* window) override; |
101 | 101 |
102 // aura::WindowObserver overrides: | 102 // aura::WindowObserver overrides: |
103 virtual void OnWindowPropertyChanged( | 103 virtual void OnWindowPropertyChanged( |
104 aura::Window* window, const void* key, intptr_t old) OVERRIDE; | 104 aura::Window* window, const void* key, intptr_t old) override; |
105 virtual void OnWindowBoundsChanged( | 105 virtual void OnWindowBoundsChanged( |
106 aura::Window* window, | 106 aura::Window* window, |
107 const gfx::Rect& old_bounds, | 107 const gfx::Rect& old_bounds, |
108 const gfx::Rect& new_bounds) OVERRIDE; | 108 const gfx::Rect& new_bounds) override; |
109 virtual void OnWindowDestroyed(aura::Window* window) OVERRIDE; | 109 virtual void OnWindowDestroyed(aura::Window* window) override; |
110 | 110 |
111 private: | 111 private: |
112 friend class base::RefCounted<Impl>; | 112 friend class base::RefCounted<Impl>; |
113 friend class ShadowController; | 113 friend class ShadowController; |
114 friend class ShadowController::TestApi; | 114 friend class ShadowController::TestApi; |
115 | 115 |
116 typedef std::map<aura::Window*, linked_ptr<Shadow> > WindowShadowMap; | 116 typedef std::map<aura::Window*, linked_ptr<Shadow> > WindowShadowMap; |
117 | 117 |
118 Impl(); | 118 Impl(); |
119 virtual ~Impl(); | 119 virtual ~Impl(); |
(...skipping 156 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
276 impl_->OnWindowActivated(gained_active, lost_active); | 276 impl_->OnWindowActivated(gained_active, lost_active); |
277 } | 277 } |
278 | 278 |
279 // ShadowController::TestApi --------------------------------------------------- | 279 // ShadowController::TestApi --------------------------------------------------- |
280 | 280 |
281 Shadow* ShadowController::TestApi::GetShadowForWindow(aura::Window* window) { | 281 Shadow* ShadowController::TestApi::GetShadowForWindow(aura::Window* window) { |
282 return controller_->impl_->GetShadowForWindow(window); | 282 return controller_->impl_->GetShadowForWindow(window); |
283 } | 283 } |
284 | 284 |
285 } // namespace wm | 285 } // namespace wm |
OLD | NEW |