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 130 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
141 | 141 |
142 // Should never be called before |CreateInstance()|. | 142 // Should never be called before |CreateInstance()|. |
143 static Shell* GetInstance(); | 143 static Shell* GetInstance(); |
144 | 144 |
145 // Returns true if the ash shell has been instantiated. | 145 // Returns true if the ash shell has been instantiated. |
146 static bool HasInstance(); | 146 static bool HasInstance(); |
147 | 147 |
148 static void DeleteInstance(); | 148 static void DeleteInstance(); |
149 | 149 |
150 // Returns the root window controller for the primary root window. | 150 // Returns the root window controller for the primary root window. |
| 151 // TODO(oshima): move this to |RootWindowController| |
151 static internal::RootWindowController* GetPrimaryRootWindowController(); | 152 static internal::RootWindowController* GetPrimaryRootWindowController(); |
152 | 153 |
153 // Returns all root window controllers. | 154 // Returns all root window controllers. |
| 155 // TODO(oshima): move this to |RootWindowController| |
154 static RootWindowControllerList GetAllRootWindowControllers(); | 156 static RootWindowControllerList GetAllRootWindowControllers(); |
155 | 157 |
156 // Returns the primary RootWindow. The primary RootWindow is the one | 158 // Returns the primary RootWindow. The primary RootWindow is the one |
157 // that has a launcher. | 159 // that has a launcher. |
158 static aura::RootWindow* GetPrimaryRootWindow(); | 160 static aura::RootWindow* GetPrimaryRootWindow(); |
159 | 161 |
160 // Returns the active RootWindow. The active RootWindow is the one that | 162 // Returns the active RootWindow. The active RootWindow is the one that |
161 // contains the current active window as a decendant child. The active | 163 // contains the current active window as a decendant child. The active |
162 // RootWindow remains the same even when the active window becomes NULL, | 164 // RootWindow remains the same even when the active window becomes NULL, |
163 // until the another window who has a different root window becomes active. | 165 // 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... |
351 void CreateModalBackground(aura::Window* window); | 353 void CreateModalBackground(aura::Window* window); |
352 | 354 |
353 // Called when a modal window is removed. It will activate | 355 // Called when a modal window is removed. It will activate |
354 // another modal window if any, or remove modal screens | 356 // another modal window if any, or remove modal screens |
355 // on all displays. | 357 // on all displays. |
356 void OnModalWindowRemoved(aura::Window* removed); | 358 void OnModalWindowRemoved(aura::Window* removed); |
357 | 359 |
358 // Returns WebNotificationTray on the primary root window. | 360 // Returns WebNotificationTray on the primary root window. |
359 WebNotificationTray* GetWebNotificationTray(); | 361 WebNotificationTray* GetWebNotificationTray(); |
360 | 362 |
361 // Convenience accessor for members of StatusAreaWidget. | 363 // Does the primary display have status area? |
362 // NOTE: status_area_widget() may return NULL during shutdown; | 364 bool HasPrimaryStatusArea(); |
363 // tray_delegate() and system_tray() will crash if called after | 365 |
364 // status_area_widget() has been destroyed; check status_area_widget() | 366 // Returns the system tray on primary display. |
365 // before calling these in destructors. | 367 SystemTray* GetPrimarySystemTray(); |
366 internal::StatusAreaWidget* status_area_widget(); | |
367 SystemTray* system_tray(); | |
368 | 368 |
369 // TODO(stevenjb): Rename to system_tray_delegate(). | 369 // TODO(stevenjb): Rename to system_tray_delegate(). |
370 SystemTrayDelegate* tray_delegate() { | 370 SystemTrayDelegate* tray_delegate() { |
371 return system_tray_delegate_.get(); | 371 return system_tray_delegate_.get(); |
372 } | 372 } |
373 | 373 |
374 SystemTrayNotifier* system_tray_notifier() { | 374 SystemTrayNotifier* system_tray_notifier() { |
375 return system_tray_notifier_.get(); | 375 return system_tray_notifier_.get(); |
376 } | 376 } |
377 | 377 |
(...skipping 165 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
543 | 543 |
544 // For testing only: simulate that a modal window is open | 544 // For testing only: simulate that a modal window is open |
545 bool simulate_modal_window_open_for_testing_; | 545 bool simulate_modal_window_open_for_testing_; |
546 | 546 |
547 DISALLOW_COPY_AND_ASSIGN(Shell); | 547 DISALLOW_COPY_AND_ASSIGN(Shell); |
548 }; | 548 }; |
549 | 549 |
550 } // namespace ash | 550 } // namespace ash |
551 | 551 |
552 #endif // ASH_SHELL_H_ | 552 #endif // ASH_SHELL_H_ |
OLD | NEW |