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 #ifndef ASH_WM_SYSTEM_MODAL_CONTAINER_LAYOUT_MANAGER_H_ | 5 #ifndef ASH_WM_SYSTEM_MODAL_CONTAINER_LAYOUT_MANAGER_H_ |
6 #define ASH_WM_SYSTEM_MODAL_CONTAINER_LAYOUT_MANAGER_H_ | 6 #define ASH_WM_SYSTEM_MODAL_CONTAINER_LAYOUT_MANAGER_H_ |
7 | 7 |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "ash/wm/system_modal_container_event_filter_delegate.h" | 10 #include "ash/wm/system_modal_container_event_filter_delegate.h" |
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
50 | 50 |
51 // Overridden from aura::WindowObserver: | 51 // Overridden from aura::WindowObserver: |
52 virtual void OnWindowPropertyChanged(aura::Window* window, | 52 virtual void OnWindowPropertyChanged(aura::Window* window, |
53 const void* key, | 53 const void* key, |
54 intptr_t old) OVERRIDE; | 54 intptr_t old) OVERRIDE; |
55 virtual void OnWindowDestroying(aura::Window* window) OVERRIDE; | 55 virtual void OnWindowDestroying(aura::Window* window) OVERRIDE; |
56 | 56 |
57 // Overridden from SystemModalContainerEventFilterDelegate: | 57 // Overridden from SystemModalContainerEventFilterDelegate: |
58 virtual bool CanWindowReceiveEvents(aura::Window* window) OVERRIDE; | 58 virtual bool CanWindowReceiveEvents(aura::Window* window) OVERRIDE; |
59 | 59 |
| 60 // Is the |window| modal screen? |
| 61 static bool IsModalScreen(aura::Window* window); |
| 62 |
60 private: | 63 private: |
61 void AddModalWindow(aura::Window* window); | 64 void AddModalWindow(aura::Window* window); |
62 void RemoveModalWindow(aura::Window* window); | 65 void RemoveModalWindow(aura::Window* window); |
63 | 66 |
64 void CreateModalScreen(); | 67 void CreateModalScreen(); |
65 void DestroyModalScreen(); | 68 void DestroyModalScreen(); |
66 | 69 |
67 aura::Window* modal_window() { | 70 aura::Window* modal_window() { |
68 return !modal_windows_.empty() ? modal_windows_.back() : NULL; | 71 return !modal_windows_.empty() ? modal_windows_.back() : NULL; |
69 } | 72 } |
(...skipping 13 matching lines...) Expand all Loading... |
83 // added, and removed when the last is closed. | 86 // added, and removed when the last is closed. |
84 scoped_ptr<aura::EventFilter> modality_filter_; | 87 scoped_ptr<aura::EventFilter> modality_filter_; |
85 | 88 |
86 DISALLOW_COPY_AND_ASSIGN(SystemModalContainerLayoutManager); | 89 DISALLOW_COPY_AND_ASSIGN(SystemModalContainerLayoutManager); |
87 }; | 90 }; |
88 | 91 |
89 } // namespace internal | 92 } // namespace internal |
90 } // namespace ash | 93 } // namespace ash |
91 | 94 |
92 #endif // ASH_WM_SYSTEM_MODAL_CONTAINER_LAYOUT_MANAGER_H_ | 95 #endif // ASH_WM_SYSTEM_MODAL_CONTAINER_LAYOUT_MANAGER_H_ |
OLD | NEW |