| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 UI_AURA_SHELL_SHELL_H_ | 5 #ifndef UI_AURA_SHELL_SHELL_H_ |
| 6 #define UI_AURA_SHELL_SHELL_H_ | 6 #define UI_AURA_SHELL_SHELL_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <utility> | 9 #include <utility> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 22 matching lines...) Expand all Loading... |
| 33 | 33 |
| 34 namespace internal { | 34 namespace internal { |
| 35 class AppList; | 35 class AppList; |
| 36 class DragDropController; | 36 class DragDropController; |
| 37 class ShadowController; | 37 class ShadowController; |
| 38 class ShellAcceleratorFilter; | 38 class ShellAcceleratorFilter; |
| 39 class WorkspaceController; | 39 class WorkspaceController; |
| 40 } | 40 } |
| 41 | 41 |
| 42 // Shell is a singleton object that presents the Shell API and implements the | 42 // Shell is a singleton object that presents the Shell API and implements the |
| 43 // Desktop's delegate interface. | 43 // RootWindow's delegate interface. |
| 44 class AURA_SHELL_EXPORT Shell { | 44 class AURA_SHELL_EXPORT Shell { |
| 45 public: | 45 public: |
| 46 // Upon creation, the Shell sets itself as the Desktop's delegate, which takes | 46 // Upon creation, the Shell sets itself as the RootWindow's delegate, which |
| 47 // ownership of the Shell. | 47 // takes ownership of the Shell. |
| 48 | 48 |
| 49 // A shell must be explicitly created so that it can call |Init()| with the | 49 // A shell must be explicitly created so that it can call |Init()| with the |
| 50 // delegate set. |delegate| can be NULL (if not required for initialization). | 50 // delegate set. |delegate| can be NULL (if not required for initialization). |
| 51 static Shell* CreateInstance(ShellDelegate* delegate); | 51 static Shell* CreateInstance(ShellDelegate* delegate); |
| 52 | 52 |
| 53 // Should never be called before |CreateInstance()|. | 53 // Should never be called before |CreateInstance()|. |
| 54 static Shell* GetInstance(); | 54 static Shell* GetInstance(); |
| 55 | 55 |
| 56 static void DeleteInstance(); | 56 static void DeleteInstance(); |
| 57 | 57 |
| 58 aura::Window* GetContainer(int container_id); | 58 aura::Window* GetContainer(int container_id); |
| 59 const aura::Window* GetContainer(int container_id) const; | 59 const aura::Window* GetContainer(int container_id) const; |
| 60 | 60 |
| 61 // Adds or removes |filter| from the DesktopEventFilter. | 61 // Adds or removes |filter| from the RootWindowEventFilter. |
| 62 void AddDesktopEventFilter(aura::EventFilter* filter); | 62 void AddRootWindowEventFilter(aura::EventFilter* filter); |
| 63 void RemoveDesktopEventFilter(aura::EventFilter* filter); | 63 void RemoveRootWindowEventFilter(aura::EventFilter* filter); |
| 64 | 64 |
| 65 // Toggles between overview mode and normal mode. | 65 // Toggles between overview mode and normal mode. |
| 66 void ToggleOverview(); | 66 void ToggleOverview(); |
| 67 | 67 |
| 68 // Toggles app list. | 68 // Toggles app list. |
| 69 void ToggleAppList(); | 69 void ToggleAppList(); |
| 70 | 70 |
| 71 ShellAcceleratorController* accelerator_controller() { | 71 ShellAcceleratorController* accelerator_controller() { |
| 72 return accelerator_controller_.get(); | 72 return accelerator_controller_.get(); |
| 73 } | 73 } |
| (...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 117 scoped_ptr<internal::ShellAcceleratorFilter> accelerator_filter_; | 117 scoped_ptr<internal::ShellAcceleratorFilter> accelerator_filter_; |
| 118 | 118 |
| 119 scoped_ptr<ShellTooltipManager> tooltip_manager_; | 119 scoped_ptr<ShellTooltipManager> tooltip_manager_; |
| 120 | 120 |
| 121 DISALLOW_COPY_AND_ASSIGN(Shell); | 121 DISALLOW_COPY_AND_ASSIGN(Shell); |
| 122 }; | 122 }; |
| 123 | 123 |
| 124 } // namespace aura_shell | 124 } // namespace aura_shell |
| 125 | 125 |
| 126 #endif // UI_AURA_SHELL_SHELL_H_ | 126 #endif // UI_AURA_SHELL_SHELL_H_ |
| OLD | NEW |