| 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 #ifndef UI_WM_CORE_TRANSIENT_WINDOW_MANAGER_H_ | 5 #ifndef UI_WM_CORE_TRANSIENT_WINDOW_MANAGER_H_ |
| 6 #define UI_WM_CORE_TRANSIENT_WINDOW_MANAGER_H_ | 6 #define UI_WM_CORE_TRANSIENT_WINDOW_MANAGER_H_ |
| 7 | 7 |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "base/observer_list.h" | 10 #include "base/observer_list.h" |
| 11 #include "ui/aura/window_observer.h" | 11 #include "ui/aura/window_observer.h" |
| 12 #include "ui/wm/wm_export.h" | 12 #include "ui/wm/core/wm_core_export.h" |
| 13 | 13 |
| 14 namespace wm { | 14 namespace wm { |
| 15 | 15 |
| 16 class TransientWindowObserver; | 16 class TransientWindowObserver; |
| 17 | 17 |
| 18 // TransientWindowManager manages the set of transient children for a window | 18 // TransientWindowManager manages the set of transient children for a window |
| 19 // along with the transient parent. Transient children get the following | 19 // along with the transient parent. Transient children get the following |
| 20 // behavior: | 20 // behavior: |
| 21 // . The transient parent destroys any transient children when it is | 21 // . The transient parent destroys any transient children when it is |
| 22 // destroyed. This means a transient child is destroyed if either its parent | 22 // destroyed. This means a transient child is destroyed if either its parent |
| 23 // or transient parent is destroyed. | 23 // or transient parent is destroyed. |
| 24 // . If a transient child and its transient parent share the same parent, then | 24 // . If a transient child and its transient parent share the same parent, then |
| 25 // transient children are always ordered above the transient parent. | 25 // transient children are always ordered above the transient parent. |
| 26 // Transient windows are typically used for popups and menus. | 26 // Transient windows are typically used for popups and menus. |
| 27 // TODO(sky): when we nuke TransientWindowClient rename this to | 27 // TODO(sky): when we nuke TransientWindowClient rename this to |
| 28 // TransientWindowController. | 28 // TransientWindowController. |
| 29 class WM_EXPORT TransientWindowManager : public aura::WindowObserver { | 29 class WM_CORE_EXPORT TransientWindowManager : public aura::WindowObserver { |
| 30 public: | 30 public: |
| 31 typedef std::vector<aura::Window*> Windows; | 31 typedef std::vector<aura::Window*> Windows; |
| 32 | 32 |
| 33 virtual ~TransientWindowManager(); | 33 virtual ~TransientWindowManager(); |
| 34 | 34 |
| 35 // Returns the TransientWindowManager for |window|. This never returns NULL. | 35 // Returns the TransientWindowManager for |window|. This never returns NULL. |
| 36 static TransientWindowManager* Get(aura::Window* window); | 36 static TransientWindowManager* Get(aura::Window* window); |
| 37 | 37 |
| 38 // Returns the TransientWindowManager for |window| only if it already exists. | 38 // Returns the TransientWindowManager for |window| only if it already exists. |
| 39 // WARNING: this may return NULL. | 39 // WARNING: this may return NULL. |
| (...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 82 aura::Window* stacking_target_; | 82 aura::Window* stacking_target_; |
| 83 | 83 |
| 84 ObserverList<TransientWindowObserver> observers_; | 84 ObserverList<TransientWindowObserver> observers_; |
| 85 | 85 |
| 86 DISALLOW_COPY_AND_ASSIGN(TransientWindowManager); | 86 DISALLOW_COPY_AND_ASSIGN(TransientWindowManager); |
| 87 }; | 87 }; |
| 88 | 88 |
| 89 } // namespace wm | 89 } // namespace wm |
| 90 | 90 |
| 91 #endif // UI_WM_CORE_TRANSIENT_WINDOW_MANAGER_H_ | 91 #endif // UI_WM_CORE_TRANSIENT_WINDOW_MANAGER_H_ |
| OLD | NEW |