OLD | NEW |
1 // Copyright (c) 2011 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 #ifndef ASH_WM_SHADOW_CONTROLLER_H_ | 5 #ifndef ASH_WM_SHADOW_CONTROLLER_H_ |
6 #define ASH_WM_SHADOW_CONTROLLER_H_ | 6 #define ASH_WM_SHADOW_CONTROLLER_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <map> | 9 #include <map> |
10 | 10 |
11 #include "base/basictypes.h" | 11 #include "base/basictypes.h" |
(...skipping 12 matching lines...) Expand all Loading... |
24 | 24 |
25 namespace ash { | 25 namespace ash { |
26 namespace internal { | 26 namespace internal { |
27 | 27 |
28 class Shadow; | 28 class Shadow; |
29 | 29 |
30 // ShadowController observes changes to windows and creates and updates drop | 30 // ShadowController observes changes to windows and creates and updates drop |
31 // shadows as needed. | 31 // shadows as needed. |
32 class ASH_EXPORT ShadowController : public aura::RootWindowObserver, | 32 class ASH_EXPORT ShadowController : public aura::RootWindowObserver, |
33 public aura::WindowObserver { | 33 public aura::WindowObserver { |
34 public: | 34 public: |
35 class TestApi { | 35 class TestApi { |
36 public: | 36 public: |
37 explicit TestApi(ShadowController* controller) : controller_(controller) {} | 37 explicit TestApi(ShadowController* controller) : controller_(controller) {} |
38 ~TestApi() {} | 38 ~TestApi() {} |
39 | 39 |
40 Shadow* GetShadowForWindow(aura::Window* window) { | 40 Shadow* GetShadowForWindow(aura::Window* window) { |
41 return controller_->GetShadowForWindow(window); | 41 return controller_->GetShadowForWindow(window); |
42 } | 42 } |
43 | 43 |
44 private: | 44 private: |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
76 | 76 |
77 // Creates a new shadow for |window| and stores it in |window_shadows_|. The | 77 // Creates a new shadow for |window| and stores it in |window_shadows_|. The |
78 // shadow's bounds are initialized and it is added to the window's layer. | 78 // shadow's bounds are initialized and it is added to the window's layer. |
79 void CreateShadowForWindow(aura::Window* window); | 79 void CreateShadowForWindow(aura::Window* window); |
80 | 80 |
81 WindowShadowMap window_shadows_; | 81 WindowShadowMap window_shadows_; |
82 | 82 |
83 DISALLOW_COPY_AND_ASSIGN(ShadowController); | 83 DISALLOW_COPY_AND_ASSIGN(ShadowController); |
84 }; | 84 }; |
85 | 85 |
86 } // namepsace internal | 86 } // namespace internal |
87 } // namepsace ash | 87 } // namespace ash |
88 | 88 |
89 #endif // ASH_WM_SHADOW_CONTROLLER_H_ | 89 #endif // ASH_WM_SHADOW_CONTROLLER_H_ |
OLD | NEW |