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 "ui/wm/core/transient_window_manager.h" | 5 #include "ui/wm/core/transient_window_manager.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <functional> | 8 #include <functional> |
9 | 9 |
10 #include "base/auto_reset.h" | 10 #include "base/auto_reset.h" |
11 #include "ui/aura/client/transient_window_client_observer.h" | 11 #include "ui/aura/client/transient_window_client_observer.h" |
12 #include "ui/aura/window.h" | 12 #include "ui/aura/window.h" |
13 #include "ui/aura/window_property.h" | |
14 #include "ui/aura/window_tracker.h" | 13 #include "ui/aura/window_tracker.h" |
| 14 #include "ui/base/class_property.h" |
15 #include "ui/wm/core/transient_window_controller.h" | 15 #include "ui/wm/core/transient_window_controller.h" |
16 #include "ui/wm/core/transient_window_observer.h" | 16 #include "ui/wm/core/transient_window_observer.h" |
17 #include "ui/wm/core/transient_window_stacking_client.h" | 17 #include "ui/wm/core/transient_window_stacking_client.h" |
18 #include "ui/wm/core/window_util.h" | 18 #include "ui/wm/core/window_util.h" |
19 | 19 |
20 using aura::Window; | 20 using aura::Window; |
21 | 21 |
22 DECLARE_WINDOW_PROPERTY_TYPE(wm::TransientWindowManager*); | 22 DECLARE_UI_CLASS_PROPERTY_TYPE(::wm::TransientWindowManager*); |
23 | 23 |
24 namespace wm { | 24 namespace wm { |
25 namespace { | 25 namespace { |
26 | 26 |
27 DEFINE_OWNED_WINDOW_PROPERTY_KEY(TransientWindowManager, kPropertyKey, NULL); | 27 DEFINE_OWNED_UI_CLASS_PROPERTY_KEY(TransientWindowManager, kPropertyKey, NULL); |
28 | 28 |
29 } // namespace | 29 } // namespace |
30 | 30 |
31 TransientWindowManager::~TransientWindowManager() { | 31 TransientWindowManager::~TransientWindowManager() { |
32 } | 32 } |
33 | 33 |
34 // static | 34 // static |
35 TransientWindowManager* TransientWindowManager::Get(Window* window) { | 35 TransientWindowManager* TransientWindowManager::Get(Window* window) { |
36 TransientWindowManager* manager = window->GetProperty(kPropertyKey); | 36 TransientWindowManager* manager = window->GetProperty(kPropertyKey); |
37 if (!manager) { | 37 if (!manager) { |
(...skipping 199 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
237 // Destroy transient children, only after we've removed ourselves from our | 237 // Destroy transient children, only after we've removed ourselves from our |
238 // parent, as destroying an active transient child may otherwise attempt to | 238 // parent, as destroying an active transient child may otherwise attempt to |
239 // refocus us. | 239 // refocus us. |
240 Windows transient_children(transient_children_); | 240 Windows transient_children(transient_children_); |
241 for (auto* child : transient_children) | 241 for (auto* child : transient_children) |
242 delete child; | 242 delete child; |
243 DCHECK(transient_children_.empty()); | 243 DCHECK(transient_children_.empty()); |
244 } | 244 } |
245 | 245 |
246 } // namespace wm | 246 } // namespace wm |
OLD | NEW |