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 |
11 #include "ash/ash_export.h" | 11 #include "ash/ash_export.h" |
| 12 #include "ash/display/display_manager_delegate.h" |
12 #include "ash/shelf_types.h" | 13 #include "ash/shelf_types.h" |
13 #include "ash/system/user/login_status.h" | 14 #include "ash/system/user/login_status.h" |
14 #include "ash/wm/cursor_manager.h" | 15 #include "ash/wm/cursor_manager.h" |
15 #include "ash/wm/system_modal_container_event_filter_delegate.h" | 16 #include "ash/wm/system_modal_container_event_filter_delegate.h" |
16 #include "base/basictypes.h" | 17 #include "base/basictypes.h" |
17 #include "base/compiler_specific.h" | 18 #include "base/compiler_specific.h" |
18 #include "base/gtest_prod_util.h" | 19 #include "base/gtest_prod_util.h" |
19 #include "base/memory/scoped_ptr.h" | 20 #include "base/memory/scoped_ptr.h" |
20 #include "base/observer_list.h" | 21 #include "base/observer_list.h" |
21 #include "ui/base/events/event_target.h" | 22 #include "ui/base/events/event_target.h" |
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
118 namespace test { | 119 namespace test { |
119 class ShellTestApi; | 120 class ShellTestApi; |
120 } | 121 } |
121 | 122 |
122 // Shell is a singleton object that presents the Shell API and implements the | 123 // Shell is a singleton object that presents the Shell API and implements the |
123 // RootWindow's delegate interface. | 124 // RootWindow's delegate interface. |
124 // | 125 // |
125 // Upon creation, the Shell sets itself as the RootWindow's delegate, which | 126 // Upon creation, the Shell sets itself as the RootWindow's delegate, which |
126 // takes ownership of the Shell. | 127 // takes ownership of the Shell. |
127 class ASH_EXPORT Shell : internal::SystemModalContainerEventFilterDelegate, | 128 class ASH_EXPORT Shell : internal::SystemModalContainerEventFilterDelegate, |
| 129 internal::DisplayManagerDelegate, |
128 public ui::EventTarget { | 130 public ui::EventTarget { |
129 public: | 131 public: |
130 typedef std::vector<aura::RootWindow*> RootWindowList; | 132 typedef std::vector<aura::RootWindow*> RootWindowList; |
131 typedef std::vector<internal::RootWindowController*> RootWindowControllerList; | 133 typedef std::vector<internal::RootWindowController*> RootWindowControllerList; |
132 | 134 |
133 enum Direction { | 135 enum Direction { |
134 FORWARD, | 136 FORWARD, |
135 BACKWARD | 137 BACKWARD |
136 }; | 138 }; |
137 | 139 |
(...skipping 296 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
434 internal::RootWindowController* root_window_controller); | 436 internal::RootWindowController* root_window_controller); |
435 | 437 |
436 // ash::internal::SystemModalContainerEventFilterDelegate overrides: | 438 // ash::internal::SystemModalContainerEventFilterDelegate overrides: |
437 virtual bool CanWindowReceiveEvents(aura::Window* window) OVERRIDE; | 439 virtual bool CanWindowReceiveEvents(aura::Window* window) OVERRIDE; |
438 | 440 |
439 // Overridden from ui::EventTarget: | 441 // Overridden from ui::EventTarget: |
440 virtual bool CanAcceptEvent(const ui::Event& event) OVERRIDE; | 442 virtual bool CanAcceptEvent(const ui::Event& event) OVERRIDE; |
441 virtual EventTarget* GetParentTarget() OVERRIDE; | 443 virtual EventTarget* GetParentTarget() OVERRIDE; |
442 virtual void OnEvent(ui::Event* event) OVERRIDE; | 444 virtual void OnEvent(ui::Event* event) OVERRIDE; |
443 | 445 |
| 446 // ash::internal::DisplayManagerDelegate overrides: |
| 447 virtual aura::RootWindowDelegate* CreateRootWindowDelegate() OVERRIDE; |
| 448 |
444 static Shell* instance_; | 449 static Shell* instance_; |
445 | 450 |
446 // If set before the Shell is initialized, the mouse cursor will be hidden | 451 // If set before the Shell is initialized, the mouse cursor will be hidden |
447 // when the screen is initially created. | 452 // when the screen is initially created. |
448 static bool initially_hide_cursor_; | 453 static bool initially_hide_cursor_; |
449 | 454 |
450 ScreenAsh* screen_; | 455 ScreenAsh* screen_; |
451 | 456 |
452 // Active root window. Never becomes NULL during the session. | 457 // Active root window. Never becomes NULL during the session. |
453 aura::RootWindow* active_root_window_; | 458 aura::RootWindow* active_root_window_; |
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
543 | 548 |
544 // For testing only: simulate that a modal window is open | 549 // For testing only: simulate that a modal window is open |
545 bool simulate_modal_window_open_for_testing_; | 550 bool simulate_modal_window_open_for_testing_; |
546 | 551 |
547 DISALLOW_COPY_AND_ASSIGN(Shell); | 552 DISALLOW_COPY_AND_ASSIGN(Shell); |
548 }; | 553 }; |
549 | 554 |
550 } // namespace ash | 555 } // namespace ash |
551 | 556 |
552 #endif // ASH_SHELL_H_ | 557 #endif // ASH_SHELL_H_ |
OLD | NEW |