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_SHELL_H_ | 5 #ifndef ASH_SHELL_H_ |
6 #define ASH_SHELL_H_ | 6 #define ASH_SHELL_H_ |
7 | 7 |
8 #include <utility> | 8 #include <utility> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
154 | 154 |
155 // Should never be called before |CreateInstance()|. | 155 // Should never be called before |CreateInstance()|. |
156 static Shell* GetInstance(); | 156 static Shell* GetInstance(); |
157 | 157 |
158 // Returns true if the ash shell has been instantiated. | 158 // Returns true if the ash shell has been instantiated. |
159 static bool HasInstance(); | 159 static bool HasInstance(); |
160 | 160 |
161 static void DeleteInstance(); | 161 static void DeleteInstance(); |
162 | 162 |
163 // Returns the root window controller for the primary root window. | 163 // Returns the root window controller for the primary root window. |
| 164 // TODO(oshima): move this to |RootWindowController| |
164 static internal::RootWindowController* GetPrimaryRootWindowController(); | 165 static internal::RootWindowController* GetPrimaryRootWindowController(); |
165 | 166 |
166 // Returns all root window controllers. | 167 // Returns all root window controllers. |
| 168 // TODO(oshima): move this to |RootWindowController| |
167 static RootWindowControllerList GetAllRootWindowControllers(); | 169 static RootWindowControllerList GetAllRootWindowControllers(); |
168 | 170 |
169 // Returns the primary RootWindow. The primary RootWindow is the one | 171 // Returns the primary RootWindow. The primary RootWindow is the one |
170 // that has a launcher. | 172 // that has a launcher. |
171 static aura::RootWindow* GetPrimaryRootWindow(); | 173 static aura::RootWindow* GetPrimaryRootWindow(); |
172 | 174 |
173 // Returns the active RootWindow. The active RootWindow is the one that | 175 // Returns the active RootWindow. The active RootWindow is the one that |
174 // contains the current active window as a decendant child. The active | 176 // contains the current active window as a decendant child. The active |
175 // RootWindow remains the same even when the active window becomes NULL, | 177 // RootWindow remains the same even when the active window becomes NULL, |
176 // until the another window who has a different root window becomes active. | 178 // until the another window who has a different root window becomes active. |
(...skipping 187 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
364 void CreateModalBackground(aura::Window* window); | 366 void CreateModalBackground(aura::Window* window); |
365 | 367 |
366 // Called when a modal window is removed. It will activate | 368 // Called when a modal window is removed. It will activate |
367 // another modal window if any, or remove modal screens | 369 // another modal window if any, or remove modal screens |
368 // on all displays. | 370 // on all displays. |
369 void OnModalWindowRemoved(aura::Window* removed); | 371 void OnModalWindowRemoved(aura::Window* removed); |
370 | 372 |
371 // Returns WebNotificationTray on the primary root window. | 373 // Returns WebNotificationTray on the primary root window. |
372 WebNotificationTray* GetWebNotificationTray(); | 374 WebNotificationTray* GetWebNotificationTray(); |
373 | 375 |
374 // Convenience accessor for members of StatusAreaWidget. | 376 // Does the primary display have status area? |
375 // NOTE: status_area_widget() may return NULL during shutdown; | 377 bool HasPrimaryStatusArea(); |
376 // tray_delegate() and system_tray() will crash if called after | 378 |
377 // status_area_widget() has been destroyed; check status_area_widget() | 379 // Returns the system tray on primary display. |
378 // before calling these in destructors. | 380 SystemTray* GetPrimarySystemTray(); |
379 internal::StatusAreaWidget* status_area_widget(); | |
380 SystemTray* system_tray(); | |
381 | 381 |
382 // TODO(stevenjb): Rename to system_tray_delegate(). | 382 // TODO(stevenjb): Rename to system_tray_delegate(). |
383 SystemTrayDelegate* tray_delegate() { | 383 SystemTrayDelegate* tray_delegate() { |
384 return system_tray_delegate_.get(); | 384 return system_tray_delegate_.get(); |
385 } | 385 } |
386 | 386 |
387 SystemTrayNotifier* system_tray_notifier() { | 387 SystemTrayNotifier* system_tray_notifier() { |
388 return system_tray_notifier_.get(); | 388 return system_tray_notifier_.get(); |
389 } | 389 } |
390 | 390 |
(...skipping 164 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
555 | 555 |
556 // For testing only: simulate that a modal window is open | 556 // For testing only: simulate that a modal window is open |
557 bool simulate_modal_window_open_for_testing_; | 557 bool simulate_modal_window_open_for_testing_; |
558 | 558 |
559 DISALLOW_COPY_AND_ASSIGN(Shell); | 559 DISALLOW_COPY_AND_ASSIGN(Shell); |
560 }; | 560 }; |
561 | 561 |
562 } // namespace ash | 562 } // namespace ash |
563 | 563 |
564 #endif // ASH_SHELL_H_ | 564 #endif // ASH_SHELL_H_ |
OLD | NEW |