OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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_VIEWS_WIDGET_WINDOW_REORDERER_H_ | 5 #ifndef UI_VIEWS_WIDGET_WINDOW_REORDERER_H_ |
6 #define UI_VIEWS_WIDGET_WINDOW_REORDERER_H_ | 6 #define UI_VIEWS_WIDGET_WINDOW_REORDERER_H_ |
7 | 7 |
8 #include "base/compiler_specific.h" | 8 #include "base/compiler_specific.h" |
9 #include "base/memory/scoped_ptr.h" | 9 #include "base/memory/scoped_ptr.h" |
10 #include "ui/aura/window_observer.h" | 10 #include "ui/aura/window_observer.h" |
(...skipping 19 matching lines...) Expand all Loading... |
30 // Explicitly reorder the children of |window_| (and their layers). This | 30 // Explicitly reorder the children of |window_| (and their layers). This |
31 // method should be called when the position of a view with an associated | 31 // method should be called when the position of a view with an associated |
32 // window changes in the view hierarchy. This method assumes that the | 32 // window changes in the view hierarchy. This method assumes that the |
33 // child layers of |window_| which are owned by views are already in the | 33 // child layers of |window_| which are owned by views are already in the |
34 // correct z-order relative to each other and does no reordering if there | 34 // correct z-order relative to each other and does no reordering if there |
35 // are no views with an associated window. | 35 // are no views with an associated window. |
36 void ReorderChildWindows(); | 36 void ReorderChildWindows(); |
37 | 37 |
38 private: | 38 private: |
39 // aura::WindowObserver overrides: | 39 // aura::WindowObserver overrides: |
40 virtual void OnWindowAdded(aura::Window* new_window) OVERRIDE; | 40 virtual void OnWindowAdded(aura::Window* new_window) override; |
41 virtual void OnWillRemoveWindow(aura::Window* window) OVERRIDE; | 41 virtual void OnWillRemoveWindow(aura::Window* window) override; |
42 virtual void OnWindowDestroying(aura::Window* window) OVERRIDE; | 42 virtual void OnWindowDestroying(aura::Window* window) override; |
43 | 43 |
44 // The window and the root view of the native widget which owns the | 44 // The window and the root view of the native widget which owns the |
45 // WindowReorderer. | 45 // WindowReorderer. |
46 aura::Window* parent_window_; | 46 aura::Window* parent_window_; |
47 View* root_view_; | 47 View* root_view_; |
48 | 48 |
49 // Reorders windows as a result of the kHostViewKey being set on a child of | 49 // Reorders windows as a result of the kHostViewKey being set on a child of |
50 // |parent_window_|. | 50 // |parent_window_|. |
51 class AssociationObserver; | 51 class AssociationObserver; |
52 scoped_ptr<AssociationObserver> association_observer_; | 52 scoped_ptr<AssociationObserver> association_observer_; |
53 | 53 |
54 DISALLOW_COPY_AND_ASSIGN(WindowReorderer); | 54 DISALLOW_COPY_AND_ASSIGN(WindowReorderer); |
55 }; | 55 }; |
56 | 56 |
57 } // namespace views | 57 } // namespace views |
58 | 58 |
59 #endif // UI_VIEWS_WIDGET_WINDOW_REORDERER_H_ | 59 #endif // UI_VIEWS_WIDGET_WINDOW_REORDERER_H_ |
OLD | NEW |