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 "ash/wm/resize_shadow_controller.h" | 5 #include "ash/wm/resize_shadow_controller.h" |
6 | 6 |
7 #include <utility> | 7 #include <utility> |
8 | 8 |
9 #include "ash/wm/resize_shadow.h" | 9 #include "ash/wm/resize_shadow.h" |
10 #include "ui/aura/window.h" | 10 #include "ui/aura/window.h" |
11 | 11 |
12 namespace ash { | 12 namespace ash { |
13 namespace internal { | |
14 | 13 |
15 ResizeShadowController::ResizeShadowController() { | 14 ResizeShadowController::ResizeShadowController() { |
16 } | 15 } |
17 | 16 |
18 ResizeShadowController::~ResizeShadowController() { | 17 ResizeShadowController::~ResizeShadowController() { |
19 for (WindowShadowMap::const_iterator it = window_shadows_.begin(); | 18 for (WindowShadowMap::const_iterator it = window_shadows_.begin(); |
20 it != window_shadows_.end(); ++it) { | 19 it != window_shadows_.end(); ++it) { |
21 it->first->RemoveObserver(this); | 20 it->first->RemoveObserver(this); |
22 } | 21 } |
23 } | 22 } |
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
63 // Watch for bounds changes. | 62 // Watch for bounds changes. |
64 window->AddObserver(this); | 63 window->AddObserver(this); |
65 return shadow.get(); | 64 return shadow.get(); |
66 } | 65 } |
67 | 66 |
68 ResizeShadow* ResizeShadowController::GetShadowForWindow(aura::Window* window) { | 67 ResizeShadow* ResizeShadowController::GetShadowForWindow(aura::Window* window) { |
69 WindowShadowMap::const_iterator it = window_shadows_.find(window); | 68 WindowShadowMap::const_iterator it = window_shadows_.find(window); |
70 return it != window_shadows_.end() ? it->second.get() : NULL; | 69 return it != window_shadows_.end() ? it->second.get() : NULL; |
71 } | 70 } |
72 | 71 |
73 } // namespace internal | |
74 } // namespace ash | 72 } // namespace ash |
OLD | NEW |