| 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 "base/observer_list.h" |
| 18 #include "ui/aura/monitor_manager.h" | |
| 19 #include "ui/gfx/size.h" | 18 #include "ui/gfx/size.h" |
| 20 #include "ui/gfx/insets.h" | 19 #include "ui/gfx/insets.h" |
| 21 | 20 |
| 22 class CommandLine; | 21 class CommandLine; |
| 23 class SkBitmap; | 22 class SkBitmap; |
| 24 | 23 |
| 25 namespace aura { | 24 namespace aura { |
| 26 class EventFilter; | 25 class EventFilter; |
| 26 class Monitor; |
| 27 class RootWindow; | 27 class RootWindow; |
| 28 class Window; | 28 class Window; |
| 29 } | 29 } |
| 30 namespace gfx { | 30 namespace gfx { |
| 31 class Point; | 31 class Point; |
| 32 class Rect; | 32 class Rect; |
| 33 } | 33 } |
| 34 namespace ui { | 34 namespace ui { |
| 35 class Layer; | 35 class Layer; |
| 36 } | 36 } |
| (...skipping 17 matching lines...) Expand all Loading... |
| 54 class VideoDetector; | 54 class VideoDetector; |
| 55 class WindowCycleController; | 55 class WindowCycleController; |
| 56 | 56 |
| 57 namespace internal { | 57 namespace internal { |
| 58 class ActivationController; | 58 class ActivationController; |
| 59 class AcceleratorFilter; | 59 class AcceleratorFilter; |
| 60 class AppList; | 60 class AppList; |
| 61 class DragDropController; | 61 class DragDropController; |
| 62 class FocusCycler; | 62 class FocusCycler; |
| 63 class InputMethodEventFilter; | 63 class InputMethodEventFilter; |
| 64 class MonitorController; |
| 64 class PartialScreenshotEventFilter; | 65 class PartialScreenshotEventFilter; |
| 65 class ResizeShadowController; | 66 class ResizeShadowController; |
| 66 class RootWindowEventFilter; | 67 class RootWindowEventFilter; |
| 67 class RootWindowLayoutManager; | 68 class RootWindowLayoutManager; |
| 68 class ShadowController; | 69 class ShadowController; |
| 69 class ShelfLayoutManager; | 70 class ShelfLayoutManager; |
| 70 class StackingController; | 71 class StackingController; |
| 71 class TooltipController; | 72 class TooltipController; |
| 72 class VisibilityController; | 73 class VisibilityController; |
| 73 class WindowModalityController; | 74 class WindowModalityController; |
| 74 class WorkspaceController; | 75 class WorkspaceController; |
| 75 } | 76 } |
| 76 | 77 |
| 77 // Shell is a singleton object that presents the Shell API and implements the | 78 // Shell is a singleton object that presents the Shell API and implements the |
| 78 // RootWindow's delegate interface. | 79 // RootWindow's delegate interface. |
| 79 // | 80 // |
| 80 // Upon creation, the Shell sets itself as the RootWindow's delegate, which | 81 // Upon creation, the Shell sets itself as the RootWindow's delegate, which |
| 81 // takes ownership of the Shell. | 82 // takes ownership of the Shell. |
| 82 class ASH_EXPORT Shell : public aura::MonitorObserver { | 83 class ASH_EXPORT Shell { |
| 83 public: | 84 public: |
| 84 enum Direction { | 85 enum Direction { |
| 85 FORWARD, | 86 FORWARD, |
| 86 BACKWARD | 87 BACKWARD |
| 87 }; | 88 }; |
| 88 | 89 |
| 89 // Accesses private data from a Shell for testing. | 90 // Accesses private data from a Shell for testing. |
| 90 class ASH_EXPORT TestApi { | 91 class ASH_EXPORT TestApi { |
| 91 public: | 92 public: |
| 92 explicit TestApi(Shell* shell); | 93 explicit TestApi(Shell* shell); |
| (...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 195 | 196 |
| 196 const ScreenAsh* screen() { return screen_; } | 197 const ScreenAsh* screen() { return screen_; } |
| 197 | 198 |
| 198 internal::ShelfLayoutManager* shelf() const { return shelf_; } | 199 internal::ShelfLayoutManager* shelf() const { return shelf_; } |
| 199 | 200 |
| 200 SystemTray* tray() const { return tray_.get(); } | 201 SystemTray* tray() const { return tray_.get(); } |
| 201 | 202 |
| 202 // Returns the size of the grid. | 203 // Returns the size of the grid. |
| 203 int GetGridSize() const; | 204 int GetGridSize() const; |
| 204 | 205 |
| 205 // aura::MonitorObserver overrides: | |
| 206 virtual void OnMonitorBoundsChanged(const aura::Monitor* monitor) OVERRIDE; | |
| 207 | |
| 208 static void set_initially_hide_cursor(bool hide) { | 206 static void set_initially_hide_cursor(bool hide) { |
| 209 initially_hide_cursor_ = hide; | 207 initially_hide_cursor_ = hide; |
| 210 } | 208 } |
| 211 | 209 |
| 212 internal::ResizeShadowController* resize_shadow_controller() { | 210 internal::ResizeShadowController* resize_shadow_controller() { |
| 213 return resize_shadow_controller_.get(); | 211 return resize_shadow_controller_.get(); |
| 214 } | 212 } |
| 215 | 213 |
| 216 // Made available for tests. | 214 // Made available for tests. |
| 217 internal::ShadowController* shadow_controller() { | 215 internal::ShadowController* shadow_controller() { |
| (...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 268 scoped_ptr<internal::WorkspaceController> workspace_controller_; | 266 scoped_ptr<internal::WorkspaceController> workspace_controller_; |
| 269 scoped_ptr<internal::ResizeShadowController> resize_shadow_controller_; | 267 scoped_ptr<internal::ResizeShadowController> resize_shadow_controller_; |
| 270 scoped_ptr<internal::ShadowController> shadow_controller_; | 268 scoped_ptr<internal::ShadowController> shadow_controller_; |
| 271 scoped_ptr<internal::TooltipController> tooltip_controller_; | 269 scoped_ptr<internal::TooltipController> tooltip_controller_; |
| 272 scoped_ptr<internal::VisibilityController> visibility_controller_; | 270 scoped_ptr<internal::VisibilityController> visibility_controller_; |
| 273 scoped_ptr<DesktopBackgroundController> desktop_background_controller_; | 271 scoped_ptr<DesktopBackgroundController> desktop_background_controller_; |
| 274 scoped_ptr<PowerButtonController> power_button_controller_; | 272 scoped_ptr<PowerButtonController> power_button_controller_; |
| 275 scoped_ptr<VideoDetector> video_detector_; | 273 scoped_ptr<VideoDetector> video_detector_; |
| 276 scoped_ptr<WindowCycleController> window_cycle_controller_; | 274 scoped_ptr<WindowCycleController> window_cycle_controller_; |
| 277 scoped_ptr<internal::FocusCycler> focus_cycler_; | 275 scoped_ptr<internal::FocusCycler> focus_cycler_; |
| 276 scoped_ptr<internal::MonitorController> monitor_controller_; |
| 278 | 277 |
| 279 // An event filter that pre-handles all key events to send them to an IME. | 278 // An event filter that pre-handles all key events to send them to an IME. |
| 280 scoped_ptr<internal::InputMethodEventFilter> input_method_filter_; | 279 scoped_ptr<internal::InputMethodEventFilter> input_method_filter_; |
| 281 | 280 |
| 282 // An event filter that pre-handles key events while the partial | 281 // An event filter that pre-handles key events while the partial |
| 283 // screenshot UI is active. | 282 // screenshot UI is active. |
| 284 scoped_ptr<internal::PartialScreenshotEventFilter> partial_screenshot_filter_; | 283 scoped_ptr<internal::PartialScreenshotEventFilter> partial_screenshot_filter_; |
| 285 | 284 |
| 286 #if !defined(OS_MACOSX) | 285 #if !defined(OS_MACOSX) |
| 287 // An event filter that pre-handles global accelerators. | 286 // An event filter that pre-handles global accelerators. |
| (...skipping 16 matching lines...) Expand all Loading... |
| 304 // System tray with clock, Wi-Fi signal, etc. (a replacement in progress for | 303 // System tray with clock, Wi-Fi signal, etc. (a replacement in progress for |
| 305 // |status_widget_|). | 304 // |status_widget_|). |
| 306 scoped_ptr<SystemTray> tray_; | 305 scoped_ptr<SystemTray> tray_; |
| 307 | 306 |
| 308 DISALLOW_COPY_AND_ASSIGN(Shell); | 307 DISALLOW_COPY_AND_ASSIGN(Shell); |
| 309 }; | 308 }; |
| 310 | 309 |
| 311 } // namespace ash | 310 } // namespace ash |
| 312 | 311 |
| 313 #endif // ASH_SHELL_H_ | 312 #endif // ASH_SHELL_H_ |
| OLD | NEW |