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 108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
119 class ScopedTargetRootWindow; | 119 class ScopedTargetRootWindow; |
120 class ScreenAsh; | 120 class ScreenAsh; |
121 class ScreenPositionController; | 121 class ScreenPositionController; |
122 class SessionStateDelegate; | 122 class SessionStateDelegate; |
123 class Shelf; | 123 class Shelf; |
124 class ShelfDelegate; | 124 class ShelfDelegate; |
125 class ShelfItemDelegateManager; | 125 class ShelfItemDelegateManager; |
126 class ShelfModel; | 126 class ShelfModel; |
127 class ShelfWindowWatcher; | 127 class ShelfWindowWatcher; |
128 class ShellDelegate; | 128 class ShellDelegate; |
| 129 struct ShellInitParams; |
129 class ShellObserver; | 130 class ShellObserver; |
130 class SlowAnimationEventFilter; | 131 class SlowAnimationEventFilter; |
131 class StatusAreaWidget; | 132 class StatusAreaWidget; |
132 class StickyKeysController; | 133 class StickyKeysController; |
133 class SystemGestureEventFilter; | 134 class SystemGestureEventFilter; |
134 class SystemModalContainerEventFilter; | 135 class SystemModalContainerEventFilter; |
135 class SystemTray; | 136 class SystemTray; |
136 class SystemTrayDelegate; | 137 class SystemTrayDelegate; |
137 class SystemTrayNotifier; | 138 class SystemTrayNotifier; |
138 class ToplevelWindowEventHandler; | 139 class ToplevelWindowEventHandler; |
(...skipping 28 matching lines...) Expand all Loading... |
167 typedef std::vector<RootWindowController*> RootWindowControllerList; | 168 typedef std::vector<RootWindowController*> RootWindowControllerList; |
168 | 169 |
169 enum Direction { | 170 enum Direction { |
170 FORWARD, | 171 FORWARD, |
171 BACKWARD | 172 BACKWARD |
172 }; | 173 }; |
173 | 174 |
174 // A shell must be explicitly created so that it can call |Init()| with the | 175 // A shell must be explicitly created so that it can call |Init()| with the |
175 // delegate set. |delegate| can be NULL (if not required for initialization). | 176 // delegate set. |delegate| can be NULL (if not required for initialization). |
176 // Takes ownership of |delegate|. | 177 // Takes ownership of |delegate|. |
177 static Shell* CreateInstance(ShellDelegate* delegate); | 178 static Shell* CreateInstance(const ShellInitParams& init_params); |
178 | 179 |
179 // Should never be called before |CreateInstance()|. | 180 // Should never be called before |CreateInstance()|. |
180 static Shell* GetInstance(); | 181 static Shell* GetInstance(); |
181 | 182 |
182 // Returns true if the ash shell has been instantiated. | 183 // Returns true if the ash shell has been instantiated. |
183 static bool HasInstance(); | 184 static bool HasInstance(); |
184 | 185 |
185 static void DeleteInstance(); | 186 static void DeleteInstance(); |
186 | 187 |
187 // Returns the root window controller for the primary root window. | 188 // Returns the root window controller for the primary root window. |
(...skipping 386 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
574 friend class ScopedTargetRootWindow; | 575 friend class ScopedTargetRootWindow; |
575 friend class test::ShellTestApi; | 576 friend class test::ShellTestApi; |
576 friend class shell::WindowWatcher; | 577 friend class shell::WindowWatcher; |
577 | 578 |
578 typedef std::pair<aura::Window*, gfx::Rect> WindowAndBoundsPair; | 579 typedef std::pair<aura::Window*, gfx::Rect> WindowAndBoundsPair; |
579 | 580 |
580 // Takes ownership of |delegate|. | 581 // Takes ownership of |delegate|. |
581 explicit Shell(ShellDelegate* delegate); | 582 explicit Shell(ShellDelegate* delegate); |
582 virtual ~Shell(); | 583 virtual ~Shell(); |
583 | 584 |
584 void Init(); | 585 void Init(const ShellInitParams& init_params); |
585 | 586 |
586 // Initializes virtual keyboard controller. | 587 // Initializes virtual keyboard controller. |
587 void InitKeyboard(); | 588 void InitKeyboard(); |
588 | 589 |
589 // Initializes the root window so that it can host browser windows. | 590 // Initializes the root window so that it can host browser windows. |
590 void InitRootWindow(aura::Window* root_window); | 591 void InitRootWindow(aura::Window* root_window); |
591 | 592 |
592 // ash::SystemModalContainerEventFilterDelegate overrides: | 593 // ash::SystemModalContainerEventFilterDelegate overrides: |
593 virtual bool CanWindowReceiveEvents(aura::Window* window) OVERRIDE; | 594 virtual bool CanWindowReceiveEvents(aura::Window* window) OVERRIDE; |
594 | 595 |
(...skipping 156 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
751 | 752 |
752 // Injected content::GPUDataManager support. | 753 // Injected content::GPUDataManager support. |
753 scoped_ptr<GPUSupport> gpu_support_; | 754 scoped_ptr<GPUSupport> gpu_support_; |
754 | 755 |
755 DISALLOW_COPY_AND_ASSIGN(Shell); | 756 DISALLOW_COPY_AND_ASSIGN(Shell); |
756 }; | 757 }; |
757 | 758 |
758 } // namespace ash | 759 } // namespace ash |
759 | 760 |
760 #endif // ASH_SHELL_H_ | 761 #endif // ASH_SHELL_H_ |
OLD | NEW |