[email protected] | e0d22e8 | 2012-01-04 00:46:57 | [diff] [blame] | 1 | // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
[email protected] | 87b0d82e | 2011-10-07 21:02:59 | [diff] [blame] | 2 | // Use of this source code is governed by a BSD-style license that can be |
| 3 | // found in the LICENSE file. |
| 4 | |
[email protected] | b65bdda | 2011-12-23 23:35:31 | [diff] [blame] | 5 | #ifndef ASH_SHELL_H_ |
| 6 | #define ASH_SHELL_H_ |
[email protected] | 87b0d82e | 2011-10-07 21:02:59 | [diff] [blame] | 7 | #pragma once |
| 8 | |
[email protected] | cac10fc6 | 2011-10-07 23:22:56 | [diff] [blame] | 9 | #include <utility> |
| 10 | #include <vector> |
| 11 | |
[email protected] | b65bdda | 2011-12-23 23:35:31 | [diff] [blame] | 12 | #include "ash/ash_export.h" |
[email protected] | 87b0d82e | 2011-10-07 21:02:59 | [diff] [blame] | 13 | #include "base/basictypes.h" |
[email protected] | c45fdc7 | 2012-02-22 22:59:12 | [diff] [blame] | 14 | #include "base/compiler_specific.h" |
[email protected] | b063928 | 2011-12-22 21:12:27 | [diff] [blame] | 15 | #include "base/gtest_prod_util.h" |
[email protected] | 2b99f8c | 2011-10-11 19:42:24 | [diff] [blame] | 16 | #include "base/memory/scoped_ptr.h" |
[email protected] | 0c4011b | 2012-02-11 02:10:42 | [diff] [blame] | 17 | #include "ui/gfx/size.h" |
[email protected] | 87b0d82e | 2011-10-07 21:02:59 | [diff] [blame] | 18 | |
[email protected] | b063928 | 2011-12-22 21:12:27 | [diff] [blame] | 19 | class CommandLine; |
| 20 | |
[email protected] | 87b0d82e | 2011-10-07 21:02:59 | [diff] [blame] | 21 | namespace aura { |
[email protected] | e29014c | 2011-11-16 18:25:51 | [diff] [blame] | 22 | class EventFilter; |
[email protected] | 35304ce | 2011-12-14 23:21:01 | [diff] [blame] | 23 | class RootWindow; |
[email protected] | 87b0d82e | 2011-10-07 21:02:59 | [diff] [blame] | 24 | class Window; |
| 25 | } |
[email protected] | 2b99f8c | 2011-10-11 19:42:24 | [diff] [blame] | 26 | namespace gfx { |
[email protected] | b5f3060 | 2012-01-30 15:16:57 | [diff] [blame] | 27 | class Point; |
[email protected] | cac10fc6 | 2011-10-07 23:22:56 | [diff] [blame] | 28 | class Rect; |
| 29 | } |
[email protected] | a8bd1cb | 2012-02-17 23:05:54 | [diff] [blame] | 30 | namespace ui { |
| 31 | class Layer; |
| 32 | } |
[email protected] | 57b8bb35 | 2012-01-11 05:11:46 | [diff] [blame] | 33 | namespace views { |
| 34 | class NonClientFrameView; |
| 35 | class Widget; |
| 36 | } |
[email protected] | 87b0d82e | 2011-10-07 21:02:59 | [diff] [blame] | 37 | |
[email protected] | 55f59335 | 2011-12-24 05:42:46 | [diff] [blame] | 38 | namespace ash { |
[email protected] | 87b0d82e | 2011-10-07 21:02:59 | [diff] [blame] | 39 | |
[email protected] | 2f74428 | 2011-12-23 22:40:52 | [diff] [blame] | 40 | class AcceleratorController; |
[email protected] | 671a2ae | 2011-10-13 21:53:23 | [diff] [blame] | 41 | class Launcher; |
[email protected] | 8f80db0f | 2012-02-07 14:44:53 | [diff] [blame] | 42 | class NestedDispatcherController; |
[email protected] | e0d22e8 | 2012-01-04 00:46:57 | [diff] [blame] | 43 | class PowerButtonController; |
[email protected] | 2b99f8c | 2011-10-11 19:42:24 | [diff] [blame] | 44 | class ShellDelegate; |
[email protected] | 6aa614a | 2012-01-19 22:13:38 | [diff] [blame] | 45 | class VideoDetector; |
[email protected] | 40c4cbb | 2012-01-10 23:26:07 | [diff] [blame] | 46 | class WindowCycleController; |
[email protected] | 60fa9bba | 2011-10-28 21:21:51 | [diff] [blame] | 47 | |
| 48 | namespace internal { |
[email protected] | 9fc206d | 2011-12-13 00:05:33 | [diff] [blame] | 49 | class ActivationController; |
[email protected] | 2f74428 | 2011-12-23 22:40:52 | [diff] [blame] | 50 | class AcceleratorFilter; |
[email protected] | ae4987d | 2011-11-21 22:52:44 | [diff] [blame] | 51 | class AppList; |
[email protected] | 084b6bb | 2011-11-17 05:18:16 | [diff] [blame] | 52 | class DragDropController; |
[email protected] | 3d29912a | 2012-02-07 07:41:51 | [diff] [blame] | 53 | class FocusCycler; |
[email protected] | 2c45610 | 2011-12-26 06:26:34 | [diff] [blame] | 54 | class InputMethodEventFilter; |
[email protected] | 0b0b074 | 2012-02-16 13:23:45 | [diff] [blame] | 55 | class PartialScreenshotEventFilter; |
[email protected] | 627a62f | 2012-02-14 22:59:14 | [diff] [blame] | 56 | class RootWindowEventFilter; |
[email protected] | b0079a9 | 2012-01-25 20:13:38 | [diff] [blame] | 57 | class RootWindowLayoutManager; |
[email protected] | a54e65b | 2011-11-21 22:03:34 | [diff] [blame] | 58 | class ShadowController; |
[email protected] | 4e43763 | 2012-02-13 22:39:40 | [diff] [blame] | 59 | class ShelfLayoutManager; |
[email protected] | ee1e1a2 | 2011-12-15 01:51:10 | [diff] [blame] | 60 | class StackingController; |
[email protected] | 862deef | 2011-12-15 22:07:33 | [diff] [blame] | 61 | class TooltipController; |
[email protected] | ddd91e9 | 2012-01-27 16:03:48 | [diff] [blame] | 62 | class VisibilityController; |
[email protected] | 8037357 | 2012-01-06 23:14:30 | [diff] [blame] | 63 | class WindowModalityController; |
[email protected] | 60fa9bba | 2011-10-28 21:21:51 | [diff] [blame] | 64 | class WorkspaceController; |
| 65 | } |
[email protected] | 2b99f8c | 2011-10-11 19:42:24 | [diff] [blame] | 66 | |
[email protected] | 87b0d82e | 2011-10-07 21:02:59 | [diff] [blame] | 67 | // Shell is a singleton object that presents the Shell API and implements the |
[email protected] | 99f07e0 | 2011-12-07 00:02:59 | [diff] [blame] | 68 | // RootWindow's delegate interface. |
[email protected] | b0079a9 | 2012-01-25 20:13:38 | [diff] [blame] | 69 | // |
| 70 | // Upon creation, the Shell sets itself as the RootWindow's delegate, which |
| 71 | // takes ownership of the Shell. |
[email protected] | b65bdda | 2011-12-23 23:35:31 | [diff] [blame] | 72 | class ASH_EXPORT Shell { |
[email protected] | 87b0d82e | 2011-10-07 21:02:59 | [diff] [blame] | 73 | public: |
[email protected] | b0079a9 | 2012-01-25 20:13:38 | [diff] [blame] | 74 | // In compact window mode we fill the screen with a single maximized window, |
[email protected] | d2840ef | 2012-02-01 05:10:36 | [diff] [blame] | 75 | // similar to ChromeOS R17 and earlier. In overlapping mode we have draggable |
| 76 | // windows. In managed mode the workspace arranges windows for the user. |
[email protected] | b0079a9 | 2012-01-25 20:13:38 | [diff] [blame] | 77 | enum WindowMode { |
[email protected] | d2840ef | 2012-02-01 05:10:36 | [diff] [blame] | 78 | MODE_COMPACT, |
| 79 | MODE_MANAGED, |
| 80 | MODE_OVERLAPPING, |
[email protected] | b0079a9 | 2012-01-25 20:13:38 | [diff] [blame] | 81 | }; |
[email protected] | 87b0d82e | 2011-10-07 21:02:59 | [diff] [blame] | 82 | |
[email protected] | a8bd1cb | 2012-02-17 23:05:54 | [diff] [blame] | 83 | enum BackgroundMode { |
| 84 | BACKGROUND_IMAGE, |
| 85 | BACKGROUND_SOLID_COLOR |
| 86 | }; |
| 87 | |
[email protected] | 3d29912a | 2012-02-07 07:41:51 | [diff] [blame] | 88 | enum Direction { |
| 89 | FORWARD, |
| 90 | BACKWARD |
| 91 | }; |
| 92 | |
[email protected] | 2b4cd30 | 2012-02-24 20:21:13 | [diff] [blame^] | 93 | // Accesses private data from a Shell for testing. |
| 94 | class ASH_EXPORT TestApi { |
| 95 | public: |
| 96 | explicit TestApi(Shell* shell); |
| 97 | |
| 98 | WindowMode ComputeWindowMode(CommandLine* cmd) const; |
| 99 | internal::RootWindowLayoutManager* root_window_layout(); |
| 100 | |
| 101 | private: |
| 102 | Shell* shell_; // not owned |
| 103 | |
| 104 | DISALLOW_COPY_AND_ASSIGN(TestApi); |
| 105 | }; |
| 106 | |
[email protected] | 3266c2b9 | 2011-11-14 00:06:08 | [diff] [blame] | 107 | // A shell must be explicitly created so that it can call |Init()| with the |
| 108 | // delegate set. |delegate| can be NULL (if not required for initialization). |
| 109 | static Shell* CreateInstance(ShellDelegate* delegate); |
| 110 | |
| 111 | // Should never be called before |CreateInstance()|. |
[email protected] | cac10fc6 | 2011-10-07 23:22:56 | [diff] [blame] | 112 | static Shell* GetInstance(); |
[email protected] | 3266c2b9 | 2011-11-14 00:06:08 | [diff] [blame] | 113 | |
[email protected] | ef589af | 2011-12-03 01:07:15 | [diff] [blame] | 114 | static void DeleteInstance(); |
[email protected] | cac10fc6 | 2011-10-07 23:22:56 | [diff] [blame] | 115 | |
[email protected] | e73bd780 | 2012-02-17 20:10:34 | [diff] [blame] | 116 | // Get the singleton RootWindow used by the Shell. |
| 117 | static aura::RootWindow* GetRootWindow(); |
| 118 | |
[email protected] | 0c4011b | 2012-02-11 02:10:42 | [diff] [blame] | 119 | const gfx::Size& compact_status_area_offset() const { |
| 120 | return compact_status_area_offset_; |
| 121 | } |
| 122 | |
[email protected] | a8bd1cb | 2012-02-17 23:05:54 | [diff] [blame] | 123 | BackgroundMode desktop_background_mode() const { |
| 124 | return desktop_background_mode_; |
| 125 | } |
| 126 | |
[email protected] | 87b0d82e | 2011-10-07 21:02:59 | [diff] [blame] | 127 | aura::Window* GetContainer(int container_id); |
| 128 | const aura::Window* GetContainer(int container_id) const; |
| 129 | |
[email protected] | 99f07e0 | 2011-12-07 00:02:59 | [diff] [blame] | 130 | // Adds or removes |filter| from the RootWindowEventFilter. |
| 131 | void AddRootWindowEventFilter(aura::EventFilter* filter); |
| 132 | void RemoveRootWindowEventFilter(aura::EventFilter* filter); |
[email protected] | 2c45610 | 2011-12-26 06:26:34 | [diff] [blame] | 133 | size_t GetRootWindowEventFilterCount() const; |
[email protected] | e29014c | 2011-11-16 18:25:51 | [diff] [blame] | 134 | |
[email protected] | b5f3060 | 2012-01-30 15:16:57 | [diff] [blame] | 135 | // Shows the background menu over |widget|. |
| 136 | void ShowBackgroundMenu(views::Widget* widget, const gfx::Point& location); |
[email protected] | cac10fc6 | 2011-10-07 23:22:56 | [diff] [blame] | 137 | |
[email protected] | ae4987d | 2011-11-21 22:52:44 | [diff] [blame] | 138 | // Toggles app list. |
| 139 | void ToggleAppList(); |
| 140 | |
[email protected] | a8bd1cb | 2012-02-17 23:05:54 | [diff] [blame] | 141 | // Sets the desktop background mode. |
| 142 | void SetDesktopBackgroundMode(BackgroundMode mode); |
| 143 | |
[email protected] | f7eb89c | 2011-12-13 09:48:54 | [diff] [blame] | 144 | // Returns true if the screen is locked. |
| 145 | bool IsScreenLocked() const; |
| 146 | |
[email protected] | 40c4cbb | 2012-01-10 23:26:07 | [diff] [blame] | 147 | // Returns true if a modal dialog window is currently open. |
| 148 | bool IsModalWindowOpen() const; |
| 149 | |
[email protected] | 9c66adc | 2012-01-05 02:10:16 | [diff] [blame] | 150 | // See enum WindowMode for details. |
[email protected] | d2840ef | 2012-02-01 05:10:36 | [diff] [blame] | 151 | bool IsWindowModeCompact() const { return window_mode_ == MODE_COMPACT; } |
[email protected] | 9c66adc | 2012-01-05 02:10:16 | [diff] [blame] | 152 | |
[email protected] | 0c4011b | 2012-02-11 02:10:42 | [diff] [blame] | 153 | // Sets the offset between the corner of the status area and the corner of the |
| 154 | // screen when we're using the compact window mode. |
| 155 | void SetCompactStatusAreaOffset(gfx::Size& offset); |
| 156 | |
[email protected] | 57b8bb35 | 2012-01-11 05:11:46 | [diff] [blame] | 157 | // Creates a default views::NonClientFrameView for use by windows in the |
| 158 | // Ash environment. |
| 159 | views::NonClientFrameView* CreateDefaultNonClientFrameView( |
| 160 | views::Widget* widget); |
| 161 | |
[email protected] | 3d29912a | 2012-02-07 07:41:51 | [diff] [blame] | 162 | // Rotate focus through containers that can recieve focus. |
| 163 | void RotateFocus(Direction direction); |
| 164 | |
[email protected] | 6e9f6aa | 2012-02-09 04:16:20 | [diff] [blame] | 165 | #if !defined(OS_MACOSX) |
[email protected] | 2f74428 | 2011-12-23 22:40:52 | [diff] [blame] | 166 | AcceleratorController* accelerator_controller() { |
[email protected] | 745816be | 2011-11-22 05:08:30 | [diff] [blame] | 167 | return accelerator_controller_.get(); |
| 168 | } |
[email protected] | 6e9f6aa | 2012-02-09 04:16:20 | [diff] [blame] | 169 | #endif // !defined(OS_MACOSX) |
| 170 | |
[email protected] | 627a62f | 2012-02-14 22:59:14 | [diff] [blame] | 171 | internal::RootWindowEventFilter* root_filter() { |
| 172 | return root_filter_; |
| 173 | } |
[email protected] | 862deef | 2011-12-15 22:07:33 | [diff] [blame] | 174 | internal::TooltipController* tooltip_controller() { |
| 175 | return tooltip_controller_.get(); |
[email protected] | 4a229e90 | 2011-12-01 21:21:11 | [diff] [blame] | 176 | } |
[email protected] | 0b0b074 | 2012-02-16 13:23:45 | [diff] [blame] | 177 | internal::PartialScreenshotEventFilter* partial_screenshot_filter() { |
| 178 | return partial_screenshot_filter_.get(); |
| 179 | } |
[email protected] | e0d22e8 | 2012-01-04 00:46:57 | [diff] [blame] | 180 | PowerButtonController* power_button_controller() { |
| 181 | return power_button_controller_.get(); |
| 182 | } |
[email protected] | 6aa614a | 2012-01-19 22:13:38 | [diff] [blame] | 183 | VideoDetector* video_detector() { |
| 184 | return video_detector_.get(); |
| 185 | } |
[email protected] | 40c4cbb | 2012-01-10 23:26:07 | [diff] [blame] | 186 | WindowCycleController* window_cycle_controller() { |
| 187 | return window_cycle_controller_.get(); |
| 188 | } |
[email protected] | 4a229e90 | 2011-12-01 21:21:11 | [diff] [blame] | 189 | |
[email protected] | 3266c2b9 | 2011-11-14 00:06:08 | [diff] [blame] | 190 | ShellDelegate* delegate() { return delegate_.get(); } |
[email protected] | 35304ce | 2011-12-14 23:21:01 | [diff] [blame] | 191 | |
[email protected] | 671a2ae | 2011-10-13 21:53:23 | [diff] [blame] | 192 | Launcher* launcher() { return launcher_.get(); } |
| 193 | |
[email protected] | 4e43763 | 2012-02-13 22:39:40 | [diff] [blame] | 194 | internal::ShelfLayoutManager* shelf() const { return shelf_; } |
| 195 | |
[email protected] | a54e65b | 2011-11-21 22:03:34 | [diff] [blame] | 196 | // Made available for tests. |
| 197 | internal::ShadowController* shadow_controller() { |
| 198 | return shadow_controller_.get(); |
| 199 | } |
| 200 | |
[email protected] | 2b4cd30 | 2012-02-24 20:21:13 | [diff] [blame^] | 201 | static void set_compact_window_mode_for_test(bool compact) { |
| 202 | compact_window_mode_for_test_ = compact; |
| 203 | } |
[email protected] | b063928 | 2011-12-22 21:12:27 | [diff] [blame] | 204 | |
[email protected] | 2b4cd30 | 2012-02-24 20:21:13 | [diff] [blame^] | 205 | private: |
[email protected] | cac10fc6 | 2011-10-07 23:22:56 | [diff] [blame] | 206 | typedef std::pair<aura::Window*, gfx::Rect> WindowAndBoundsPair; |
| 207 | |
[email protected] | 3266c2b9 | 2011-11-14 00:06:08 | [diff] [blame] | 208 | explicit Shell(ShellDelegate* delegate); |
| 209 | virtual ~Shell(); |
| 210 | |
| 211 | void Init(); |
[email protected] | b063928 | 2011-12-22 21:12:27 | [diff] [blame] | 212 | |
[email protected] | 2b4cd30 | 2012-02-24 20:21:13 | [diff] [blame^] | 213 | // Returns the appropriate window mode to use based on the |command_line| |
| 214 | // and |compact_window_mode_for_test_|. |
| 215 | WindowMode ComputeWindowMode(CommandLine* command_line) const; |
[email protected] | b063928 | 2011-12-22 21:12:27 | [diff] [blame] | 216 | |
[email protected] | b0079a9 | 2012-01-25 20:13:38 | [diff] [blame] | 217 | // Initializes or re-initializes the layout managers and event filters needed |
| 218 | // to support a given window mode and cleans up the unneeded ones. |
| 219 | void SetupCompactWindowMode(); |
[email protected] | d2840ef | 2012-02-01 05:10:36 | [diff] [blame] | 220 | void SetupNonCompactWindowMode(); |
[email protected] | 46ca363 | 2011-11-03 03:33:42 | [diff] [blame] | 221 | |
[email protected] | 1b62b89 | 2012-01-17 17:08:15 | [diff] [blame] | 222 | // Sets the LayoutManager of the container with the specified id to NULL. This |
| 223 | // has the effect of deleting the current LayoutManager. |
| 224 | void ResetLayoutManager(int container_id); |
| 225 | |
[email protected] | cac10fc6 | 2011-10-07 23:22:56 | [diff] [blame] | 226 | static Shell* instance_; |
| 227 | |
[email protected] | 2b4cd30 | 2012-02-24 20:21:13 | [diff] [blame^] | 228 | // Window mode is computed at shell initialization time, so allow it to be |
| 229 | // overridden without modifying the global command line. |
| 230 | static bool compact_window_mode_for_test_; |
| 231 | |
[email protected] | 627a62f | 2012-02-14 22:59:14 | [diff] [blame] | 232 | internal::RootWindowEventFilter* root_filter_; // not owned |
| 233 | |
[email protected] | cac10fc6 | 2011-10-07 23:22:56 | [diff] [blame] | 234 | std::vector<WindowAndBoundsPair> to_restore_; |
| 235 | |
[email protected] | 6e9f6aa | 2012-02-09 04:16:20 | [diff] [blame] | 236 | #if !defined(OS_MACOSX) |
[email protected] | 8f80db0f | 2012-02-07 14:44:53 | [diff] [blame] | 237 | scoped_ptr<NestedDispatcherController> nested_dispatcher_controller_; |
| 238 | |
[email protected] | 2f74428 | 2011-12-23 22:40:52 | [diff] [blame] | 239 | scoped_ptr<AcceleratorController> accelerator_controller_; |
[email protected] | 6e9f6aa | 2012-02-09 04:16:20 | [diff] [blame] | 240 | #endif // !defined(OS_MACOSX) |
[email protected] | 745816be | 2011-11-22 05:08:30 | [diff] [blame] | 241 | |
[email protected] | 2b99f8c | 2011-10-11 19:42:24 | [diff] [blame] | 242 | scoped_ptr<ShellDelegate> delegate_; |
| 243 | |
[email protected] | 671a2ae | 2011-10-13 21:53:23 | [diff] [blame] | 244 | scoped_ptr<Launcher> launcher_; |
| 245 | |
[email protected] | ae4987d | 2011-11-21 22:52:44 | [diff] [blame] | 246 | scoped_ptr<internal::AppList> app_list_; |
| 247 | |
[email protected] | ee1e1a2 | 2011-12-15 01:51:10 | [diff] [blame] | 248 | scoped_ptr<internal::StackingController> stacking_controller_; |
[email protected] | 9fc206d | 2011-12-13 00:05:33 | [diff] [blame] | 249 | scoped_ptr<internal::ActivationController> activation_controller_; |
[email protected] | 8037357 | 2012-01-06 23:14:30 | [diff] [blame] | 250 | scoped_ptr<internal::WindowModalityController> window_modality_controller_; |
[email protected] | 084b6bb | 2011-11-17 05:18:16 | [diff] [blame] | 251 | scoped_ptr<internal::DragDropController> drag_drop_controller_; |
[email protected] | 60fa9bba | 2011-10-28 21:21:51 | [diff] [blame] | 252 | scoped_ptr<internal::WorkspaceController> workspace_controller_; |
[email protected] | a54e65b | 2011-11-21 22:03:34 | [diff] [blame] | 253 | scoped_ptr<internal::ShadowController> shadow_controller_; |
[email protected] | 862deef | 2011-12-15 22:07:33 | [diff] [blame] | 254 | scoped_ptr<internal::TooltipController> tooltip_controller_; |
[email protected] | ddd91e9 | 2012-01-27 16:03:48 | [diff] [blame] | 255 | scoped_ptr<internal::VisibilityController> visibility_controller_; |
[email protected] | e0d22e8 | 2012-01-04 00:46:57 | [diff] [blame] | 256 | scoped_ptr<PowerButtonController> power_button_controller_; |
[email protected] | 6aa614a | 2012-01-19 22:13:38 | [diff] [blame] | 257 | scoped_ptr<VideoDetector> video_detector_; |
[email protected] | 40c4cbb | 2012-01-10 23:26:07 | [diff] [blame] | 258 | scoped_ptr<WindowCycleController> window_cycle_controller_; |
[email protected] | 3d29912a | 2012-02-07 07:41:51 | [diff] [blame] | 259 | scoped_ptr<internal::FocusCycler> focus_cycler_; |
[email protected] | ae18b911 | 2011-11-07 16:59:13 | [diff] [blame] | 260 | |
[email protected] | 2c45610 | 2011-12-26 06:26:34 | [diff] [blame] | 261 | // An event filter that pre-handles all key events to send them to an IME. |
| 262 | scoped_ptr<internal::InputMethodEventFilter> input_method_filter_; |
[email protected] | 6e9f6aa | 2012-02-09 04:16:20 | [diff] [blame] | 263 | |
[email protected] | 0b0b074 | 2012-02-16 13:23:45 | [diff] [blame] | 264 | // An event filter that pre-handles key events while the partial |
| 265 | // screenshot UI is active. |
| 266 | scoped_ptr<internal::PartialScreenshotEventFilter> partial_screenshot_filter_; |
| 267 | |
[email protected] | 6e9f6aa | 2012-02-09 04:16:20 | [diff] [blame] | 268 | #if !defined(OS_MACOSX) |
[email protected] | 745816be | 2011-11-22 05:08:30 | [diff] [blame] | 269 | // An event filter that pre-handles global accelerators. |
[email protected] | 2f74428 | 2011-12-23 22:40:52 | [diff] [blame] | 270 | scoped_ptr<internal::AcceleratorFilter> accelerator_filter_; |
[email protected] | 6e9f6aa | 2012-02-09 04:16:20 | [diff] [blame] | 271 | #endif |
[email protected] | 745816be | 2011-11-22 05:08:30 | [diff] [blame] | 272 | |
[email protected] | 4e43763 | 2012-02-13 22:39:40 | [diff] [blame] | 273 | // The shelf for managing the launcher and the status widget in non-compact |
| 274 | // mode. Shell does not own the shelf. Instead, it is owned by container of |
| 275 | // the status area. |
| 276 | internal::ShelfLayoutManager* shelf_; |
| 277 | |
[email protected] | 2b4cd30 | 2012-02-24 20:21:13 | [diff] [blame^] | 278 | // Does not change after Init(). |
[email protected] | 9c66adc | 2012-01-05 02:10:16 | [diff] [blame] | 279 | WindowMode window_mode_; |
[email protected] | 4a229e90 | 2011-12-01 21:21:11 | [diff] [blame] | 280 | |
[email protected] | a8bd1cb | 2012-02-17 23:05:54 | [diff] [blame] | 281 | // Can change at runtime. |
| 282 | BackgroundMode desktop_background_mode_; |
| 283 | |
[email protected] | b0079a9 | 2012-01-25 20:13:38 | [diff] [blame] | 284 | // Owned by aura::RootWindow, cached here for type safety. |
| 285 | internal::RootWindowLayoutManager* root_window_layout_; |
| 286 | |
| 287 | // Status area with clock, Wi-Fi signal, etc. |
| 288 | views::Widget* status_widget_; |
| 289 | |
[email protected] | 0c4011b | 2012-02-11 02:10:42 | [diff] [blame] | 290 | // Offset between the corner of the status area and the corner of the screen |
| 291 | // when in the compact window mode. |
| 292 | gfx::Size compact_status_area_offset_; |
| 293 | |
[email protected] | 87b0d82e | 2011-10-07 21:02:59 | [diff] [blame] | 294 | DISALLOW_COPY_AND_ASSIGN(Shell); |
| 295 | }; |
| 296 | |
[email protected] | 55f59335 | 2011-12-24 05:42:46 | [diff] [blame] | 297 | } // namespace ash |
[email protected] | 87b0d82e | 2011-10-07 21:02:59 | [diff] [blame] | 298 | |
[email protected] | b65bdda | 2011-12-23 23:35:31 | [diff] [blame] | 299 | #endif // ASH_SHELL_H_ |