| 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 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <utility> | 9 #include <utility> |
| 10 #include <vector> | 10 #include <vector> |
| 11 | 11 |
| 12 #include "ash/ash_export.h" | 12 #include "ash/ash_export.h" |
| 13 #include "base/basictypes.h" | 13 #include "base/basictypes.h" |
| 14 #include "base/compiler_specific.h" | 14 #include "base/compiler_specific.h" |
| 15 #include "base/gtest_prod_util.h" | 15 #include "base/gtest_prod_util.h" |
| 16 #include "base/memory/scoped_ptr.h" | 16 #include "base/memory/scoped_ptr.h" |
| 17 #include "base/observer_list.h" |
| 17 #include "ui/gfx/size.h" | 18 #include "ui/gfx/size.h" |
| 19 #include "ui/gfx/insets.h" |
| 18 | 20 |
| 19 class CommandLine; | 21 class CommandLine; |
| 20 | 22 |
| 21 namespace aura { | 23 namespace aura { |
| 22 class EventFilter; | 24 class EventFilter; |
| 23 class RootWindow; | 25 class RootWindow; |
| 24 class Window; | 26 class Window; |
| 25 } | 27 } |
| 26 namespace gfx { | 28 namespace gfx { |
| 27 class Point; | 29 class Point; |
| (...skipping 10 matching lines...) Expand all Loading... |
| 38 namespace ash { | 40 namespace ash { |
| 39 | 41 |
| 40 class AcceleratorController; | 42 class AcceleratorController; |
| 41 class AudioController; | 43 class AudioController; |
| 42 class BrightnessController; | 44 class BrightnessController; |
| 43 class Launcher; | 45 class Launcher; |
| 44 class NestedDispatcherController; | 46 class NestedDispatcherController; |
| 45 class NetworkController; | 47 class NetworkController; |
| 46 class PowerButtonController; | 48 class PowerButtonController; |
| 47 class PowerStatusController; | 49 class PowerStatusController; |
| 50 class ScreenAsh; |
| 48 class ShellDelegate; | 51 class ShellDelegate; |
| 52 class ShellObserver; |
| 49 class SystemTrayDelegate; | 53 class SystemTrayDelegate; |
| 50 class SystemTray; | 54 class SystemTray; |
| 51 class VideoDetector; | 55 class VideoDetector; |
| 52 class WindowCycleController; | 56 class WindowCycleController; |
| 53 | 57 |
| 54 namespace internal { | 58 namespace internal { |
| 55 class ActivationController; | 59 class ActivationController; |
| 56 class AcceleratorFilter; | 60 class AcceleratorFilter; |
| 57 class AppList; | 61 class AppList; |
| 58 class DragDropController; | 62 class DragDropController; |
| (...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 145 bool IsModalWindowOpen() const; | 149 bool IsModalWindowOpen() const; |
| 146 | 150 |
| 147 // Creates a default views::NonClientFrameView for use by windows in the | 151 // Creates a default views::NonClientFrameView for use by windows in the |
| 148 // Ash environment. | 152 // Ash environment. |
| 149 views::NonClientFrameView* CreateDefaultNonClientFrameView( | 153 views::NonClientFrameView* CreateDefaultNonClientFrameView( |
| 150 views::Widget* widget); | 154 views::Widget* widget); |
| 151 | 155 |
| 152 // Rotate focus through containers that can receive focus. | 156 // Rotate focus through containers that can receive focus. |
| 153 void RotateFocus(Direction direction); | 157 void RotateFocus(Direction direction); |
| 154 | 158 |
| 159 // Sets the screen's work area insets, this notifies observers too. |
| 160 void SetScreenWorkAreaInsets(const gfx::Insets& insets); |
| 161 |
| 162 // Add/remove observer. |
| 163 void AddShellObserver(ShellObserver* observer); |
| 164 void RemoveShellObserver(ShellObserver* observer); |
| 165 |
| 155 #if !defined(OS_MACOSX) | 166 #if !defined(OS_MACOSX) |
| 156 AcceleratorController* accelerator_controller() { | 167 AcceleratorController* accelerator_controller() { |
| 157 return accelerator_controller_.get(); | 168 return accelerator_controller_.get(); |
| 158 } | 169 } |
| 159 #endif // !defined(OS_MACOSX) | 170 #endif // !defined(OS_MACOSX) |
| 160 | 171 |
| 161 internal::RootWindowEventFilter* root_filter() { | 172 internal::RootWindowEventFilter* root_filter() { |
| 162 return root_filter_; | 173 return root_filter_; |
| 163 } | 174 } |
| 164 internal::TooltipController* tooltip_controller() { | 175 internal::TooltipController* tooltip_controller() { |
| (...skipping 25 matching lines...) Expand all Loading... |
| 190 } | 201 } |
| 191 PowerStatusController* power_status_controller() const { | 202 PowerStatusController* power_status_controller() const { |
| 192 return power_status_controller_; | 203 return power_status_controller_; |
| 193 } | 204 } |
| 194 | 205 |
| 195 ShellDelegate* delegate() { return delegate_.get(); } | 206 ShellDelegate* delegate() { return delegate_.get(); } |
| 196 SystemTrayDelegate* tray_delegate() { return tray_delegate_.get(); } | 207 SystemTrayDelegate* tray_delegate() { return tray_delegate_.get(); } |
| 197 | 208 |
| 198 Launcher* launcher() { return launcher_.get(); } | 209 Launcher* launcher() { return launcher_.get(); } |
| 199 | 210 |
| 211 const ScreenAsh* screen() { return screen_; } |
| 212 |
| 200 internal::ShelfLayoutManager* shelf() const { return shelf_; } | 213 internal::ShelfLayoutManager* shelf() const { return shelf_; } |
| 201 | 214 |
| 202 SystemTray* tray() const { return tray_.get(); } | 215 SystemTray* tray() const { return tray_.get(); } |
| 203 | 216 |
| 204 static void set_initially_hide_cursor(bool hide) { | 217 static void set_initially_hide_cursor(bool hide) { |
| 205 initially_hide_cursor_ = hide; | 218 initially_hide_cursor_ = hide; |
| 206 } | 219 } |
| 207 | 220 |
| 208 // Made available for tests. | 221 // Made available for tests. |
| 209 internal::ShadowController* shadow_controller() { | 222 internal::ShadowController* shadow_controller() { |
| (...skipping 17 matching lines...) Expand all Loading... |
| 227 // Disables the workspace grid layout. | 240 // Disables the workspace grid layout. |
| 228 void DisableWorkspaceGridLayout(); | 241 void DisableWorkspaceGridLayout(); |
| 229 | 242 |
| 230 static Shell* instance_; | 243 static Shell* instance_; |
| 231 | 244 |
| 232 // If set before the Shell is initialized, the mouse cursor will be hidden | 245 // If set before the Shell is initialized, the mouse cursor will be hidden |
| 233 // when the screen is initially created. | 246 // when the screen is initially created. |
| 234 static bool initially_hide_cursor_; | 247 static bool initially_hide_cursor_; |
| 235 | 248 |
| 236 scoped_ptr<aura::RootWindow> root_window_; | 249 scoped_ptr<aura::RootWindow> root_window_; |
| 250 ScreenAsh* screen_; |
| 237 | 251 |
| 238 internal::RootWindowEventFilter* root_filter_; // not owned | 252 internal::RootWindowEventFilter* root_filter_; // not owned |
| 239 | 253 |
| 240 std::vector<WindowAndBoundsPair> to_restore_; | 254 std::vector<WindowAndBoundsPair> to_restore_; |
| 241 | 255 |
| 242 #if !defined(OS_MACOSX) | 256 #if !defined(OS_MACOSX) |
| 243 scoped_ptr<NestedDispatcherController> nested_dispatcher_controller_; | 257 scoped_ptr<NestedDispatcherController> nested_dispatcher_controller_; |
| 244 | 258 |
| 245 scoped_ptr<AcceleratorController> accelerator_controller_; | 259 scoped_ptr<AcceleratorController> accelerator_controller_; |
| 246 #endif // !defined(OS_MACOSX) | 260 #endif // !defined(OS_MACOSX) |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 281 #if !defined(OS_MACOSX) | 295 #if !defined(OS_MACOSX) |
| 282 // An event filter that pre-handles global accelerators. | 296 // An event filter that pre-handles global accelerators. |
| 283 scoped_ptr<internal::AcceleratorFilter> accelerator_filter_; | 297 scoped_ptr<internal::AcceleratorFilter> accelerator_filter_; |
| 284 #endif | 298 #endif |
| 285 | 299 |
| 286 // The shelf for managing the launcher and the status widget in non-compact | 300 // The shelf for managing the launcher and the status widget in non-compact |
| 287 // mode. Shell does not own the shelf. Instead, it is owned by container of | 301 // mode. Shell does not own the shelf. Instead, it is owned by container of |
| 288 // the status area. | 302 // the status area. |
| 289 internal::ShelfLayoutManager* shelf_; | 303 internal::ShelfLayoutManager* shelf_; |
| 290 | 304 |
| 305 ObserverList<ShellObserver> observers_; |
| 306 |
| 291 // Can change at runtime. | 307 // Can change at runtime. |
| 292 BackgroundMode desktop_background_mode_; | 308 BackgroundMode desktop_background_mode_; |
| 293 | 309 |
| 294 // Owned by aura::RootWindow, cached here for type safety. | 310 // Owned by aura::RootWindow, cached here for type safety. |
| 295 internal::RootWindowLayoutManager* root_window_layout_; | 311 internal::RootWindowLayoutManager* root_window_layout_; |
| 296 | 312 |
| 297 // Status area with clock, Wi-Fi signal, etc. | 313 // Status area with clock, Wi-Fi signal, etc. |
| 298 views::Widget* status_widget_; | 314 views::Widget* status_widget_; |
| 299 | 315 |
| 300 // System tray with clock, Wi-Fi signal, etc. (a replacement in progress for | 316 // System tray with clock, Wi-Fi signal, etc. (a replacement in progress for |
| 301 // |status_widget_|). | 317 // |status_widget_|). |
| 302 scoped_ptr<SystemTray> tray_; | 318 scoped_ptr<SystemTray> tray_; |
| 303 | 319 |
| 304 DISALLOW_COPY_AND_ASSIGN(Shell); | 320 DISALLOW_COPY_AND_ASSIGN(Shell); |
| 305 }; | 321 }; |
| 306 | 322 |
| 307 } // namespace ash | 323 } // namespace ash |
| 308 | 324 |
| 309 #endif // ASH_SHELL_H_ | 325 #endif // ASH_SHELL_H_ |
| OLD | NEW |