Chromium Code Reviews| 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 18 matching lines...) Expand all Loading... | |
| 29 | 29 |
| 30 class Launcher; | 30 class Launcher; |
| 31 class ShellAcceleratorController; | 31 class ShellAcceleratorController; |
| 32 class ShellDelegate; | 32 class ShellDelegate; |
| 33 class ShellTooltipManager; | 33 class ShellTooltipManager; |
| 34 | 34 |
| 35 namespace internal { | 35 namespace internal { |
| 36 class ActivationController; | 36 class ActivationController; |
| 37 class AppList; | 37 class AppList; |
| 38 class DragDropController; | 38 class DragDropController; |
| 39 class InputMethodEventFilter; | |
| 39 class ShadowController; | 40 class ShadowController; |
| 40 class ShellAcceleratorFilter; | 41 class ShellAcceleratorFilter; |
| 41 class StackingController; | 42 class StackingController; |
| 42 class WorkspaceController; | 43 class WorkspaceController; |
| 43 } | 44 } |
| 44 | 45 |
| 45 // Shell is a singleton object that presents the Shell API and implements the | 46 // Shell is a singleton object that presents the Shell API and implements the |
| 46 // RootWindow's delegate interface. | 47 // RootWindow's delegate interface. |
| 47 class AURA_SHELL_EXPORT Shell { | 48 class AURA_SHELL_EXPORT Shell { |
| 48 public: | 49 public: |
| 49 // Upon creation, the Shell sets itself as the RootWindow's delegate, which | 50 // Upon creation, the Shell sets itself as the RootWindow's delegate, which |
| 50 // takes ownership of the Shell. | 51 // takes ownership of the Shell. |
| 51 | 52 |
| 52 // A shell must be explicitly created so that it can call |Init()| with the | 53 // A shell must be explicitly created so that it can call |Init()| with the |
| 53 // delegate set. |delegate| can be NULL (if not required for initialization). | 54 // delegate set. |delegate| can be NULL (if not required for initialization). |
| 54 static Shell* CreateInstance(ShellDelegate* delegate); | 55 static Shell* CreateInstance(ShellDelegate* delegate); |
| 55 | 56 |
| 56 // Should never be called before |CreateInstance()|. | 57 // Should never be called before |CreateInstance()|. |
| 57 static Shell* GetInstance(); | 58 static Shell* GetInstance(); |
| 58 | 59 |
| 59 static void DeleteInstance(); | 60 static void DeleteInstance(); |
| 60 | 61 |
| 61 aura::Window* GetContainer(int container_id); | 62 aura::Window* GetContainer(int container_id); |
| 62 const aura::Window* GetContainer(int container_id) const; | 63 const aura::Window* GetContainer(int container_id) const; |
| 63 | 64 |
| 64 // Adds or removes |filter| from the RootWindowEventFilter. | 65 // Adds or removes |filter| from the RootWindowEventFilter. |
| 65 void AddRootWindowEventFilter(aura::EventFilter* filter); | 66 void AddRootWindowEventFilter(aura::EventFilter* filter); |
| 66 void RemoveRootWindowEventFilter(aura::EventFilter* filter); | 67 void RemoveRootWindowEventFilter(aura::EventFilter* filter); |
| 68 size_t GetNumRootWindowEventFilters() const; | |
|
Ben Goodger (Google)
2011/12/20 21:02:02
GetRootWindowEventFilterCount()
Yusuke Sato
2011/12/21 16:57:27
Done.
| |
| 67 | 69 |
| 68 // Toggles between overview mode and normal mode. | 70 // Toggles between overview mode and normal mode. |
| 69 void ToggleOverview(); | 71 void ToggleOverview(); |
| 70 | 72 |
| 71 // Toggles app list. | 73 // Toggles app list. |
| 72 void ToggleAppList(); | 74 void ToggleAppList(); |
| 73 | 75 |
| 74 // Returns true if the screen is locked. | 76 // Returns true if the screen is locked. |
| 75 bool IsScreenLocked() const; | 77 bool IsScreenLocked() const; |
| 76 | 78 |
| (...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 117 scoped_ptr<Launcher> launcher_; | 119 scoped_ptr<Launcher> launcher_; |
| 118 | 120 |
| 119 scoped_ptr<internal::AppList> app_list_; | 121 scoped_ptr<internal::AppList> app_list_; |
| 120 | 122 |
| 121 scoped_ptr<internal::StackingController> stacking_controller_; | 123 scoped_ptr<internal::StackingController> stacking_controller_; |
| 122 scoped_ptr<internal::ActivationController> activation_controller_; | 124 scoped_ptr<internal::ActivationController> activation_controller_; |
| 123 scoped_ptr<internal::DragDropController> drag_drop_controller_; | 125 scoped_ptr<internal::DragDropController> drag_drop_controller_; |
| 124 scoped_ptr<internal::WorkspaceController> workspace_controller_; | 126 scoped_ptr<internal::WorkspaceController> workspace_controller_; |
| 125 scoped_ptr<internal::ShadowController> shadow_controller_; | 127 scoped_ptr<internal::ShadowController> shadow_controller_; |
| 126 | 128 |
| 129 // An event filter that pre-handles all key events to send them to an IME. | |
| 130 scoped_ptr<internal::InputMethodEventFilter> input_method_filter_; | |
| 127 // An event filter that pre-handles global accelerators. | 131 // An event filter that pre-handles global accelerators. |
| 128 scoped_ptr<internal::ShellAcceleratorFilter> accelerator_filter_; | 132 scoped_ptr<internal::ShellAcceleratorFilter> accelerator_filter_; |
| 129 | 133 |
| 130 scoped_ptr<ShellTooltipManager> tooltip_manager_; | 134 scoped_ptr<ShellTooltipManager> tooltip_manager_; |
| 131 | 135 |
| 132 DISALLOW_COPY_AND_ASSIGN(Shell); | 136 DISALLOW_COPY_AND_ASSIGN(Shell); |
| 133 }; | 137 }; |
| 134 | 138 |
| 135 } // namespace aura_shell | 139 } // namespace aura_shell |
| 136 | 140 |
| 137 #endif // UI_AURA_SHELL_SHELL_H_ | 141 #endif // UI_AURA_SHELL_SHELL_H_ |
| OLD | NEW |