| 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 "base/stl_util.h" | 11 #include "base/stl_util.h" |
| 12 #include "ui/aura/window.h" | 12 #include "ui/aura/window.h" |
| 13 #include "ui/aura/window_property.h" | 13 #include "ui/aura/window_property.h" |
| 14 #include "ui/wm/core/transient_window_observer.h" | 14 #include "ui/wm/core/transient_window_observer.h" |
| 15 #include "ui/wm/core/transient_window_stacking_client.h" | 15 #include "ui/wm/core/transient_window_stacking_client.h" |
| 16 #include "ui/wm/core/window_util.h" | 16 #include "ui/wm/core/window_util.h" |
| 17 | 17 |
| 18 using aura::Window; | 18 using aura::Window; |
| 19 | 19 |
| 20 DECLARE_WINDOW_PROPERTY_TYPE(wm::TransientWindowManager*); | |
| 21 | |
| 22 namespace wm { | 20 namespace wm { |
| 23 namespace { | 21 namespace { |
| 24 | 22 |
| 25 DEFINE_OWNED_WINDOW_PROPERTY_KEY(TransientWindowManager, kPropertyKey, NULL); | 23 DEFINE_OWNED_WINDOW_PROPERTY_KEY(TransientWindowManager, kPropertyKey, NULL); |
| 26 | 24 |
| 27 } // namespace | 25 } // namespace |
| 28 | 26 |
| 29 TransientWindowManager::~TransientWindowManager() { | 27 TransientWindowManager::~TransientWindowManager() { |
| 30 } | 28 } |
| 31 | 29 |
| (...skipping 181 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 213 | 211 |
| 214 // Destroy transient children, only after we've removed ourselves from our | 212 // Destroy transient children, only after we've removed ourselves from our |
| 215 // parent, as destroying an active transient child may otherwise attempt to | 213 // parent, as destroying an active transient child may otherwise attempt to |
| 216 // refocus us. | 214 // refocus us. |
| 217 Windows transient_children(transient_children_); | 215 Windows transient_children(transient_children_); |
| 218 STLDeleteElements(&transient_children); | 216 STLDeleteElements(&transient_children); |
| 219 DCHECK(transient_children_.empty()); | 217 DCHECK(transient_children_.empty()); |
| 220 } | 218 } |
| 221 | 219 |
| 222 } // namespace wm | 220 } // namespace wm |
| OLD | NEW |