| 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 "ui/gfx/size.h" | 17 #include "ui/gfx/size.h" |
| 18 | 18 |
| 19 class CommandLine; | 19 class CommandLine; |
| 20 class SkBitmap; |
| 20 | 21 |
| 21 namespace aura { | 22 namespace aura { |
| 22 class EventFilter; | 23 class EventFilter; |
| 23 class RootWindow; | 24 class RootWindow; |
| 24 class Window; | 25 class Window; |
| 25 } | 26 } |
| 26 namespace gfx { | 27 namespace gfx { |
| 27 class Point; | 28 class Point; |
| 28 class Rect; | 29 class Rect; |
| 29 } | 30 } |
| 30 namespace ui { | 31 namespace ui { |
| 31 class Layer; | 32 class Layer; |
| 32 } | 33 } |
| 33 namespace views { | 34 namespace views { |
| 34 class NonClientFrameView; | 35 class NonClientFrameView; |
| 35 class Widget; | 36 class Widget; |
| 36 } | 37 } |
| 37 | 38 |
| 38 namespace ash { | 39 namespace ash { |
| 39 | 40 |
| 40 class AcceleratorController; | 41 class AcceleratorController; |
| 41 class AudioController; | 42 class AudioController; |
| 42 class BrightnessController; | 43 class BrightnessController; |
| 44 class DesktopBackgroundController; |
| 43 class Launcher; | 45 class Launcher; |
| 44 class NestedDispatcherController; | 46 class NestedDispatcherController; |
| 45 class PowerButtonController; | 47 class PowerButtonController; |
| 46 class PowerStatusController; | 48 class PowerStatusController; |
| 47 class ShellDelegate; | 49 class ShellDelegate; |
| 48 class SystemTrayDelegate; | 50 class SystemTrayDelegate; |
| 49 class SystemTray; | 51 class SystemTray; |
| 50 class VideoDetector; | 52 class VideoDetector; |
| 51 class WindowCycleController; | 53 class WindowCycleController; |
| 52 | 54 |
| (...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 140 void AddRootWindowEventFilter(aura::EventFilter* filter); | 142 void AddRootWindowEventFilter(aura::EventFilter* filter); |
| 141 void RemoveRootWindowEventFilter(aura::EventFilter* filter); | 143 void RemoveRootWindowEventFilter(aura::EventFilter* filter); |
| 142 size_t GetRootWindowEventFilterCount() const; | 144 size_t GetRootWindowEventFilterCount() const; |
| 143 | 145 |
| 144 // Shows the background menu over |widget|. | 146 // Shows the background menu over |widget|. |
| 145 void ShowBackgroundMenu(views::Widget* widget, const gfx::Point& location); | 147 void ShowBackgroundMenu(views::Widget* widget, const gfx::Point& location); |
| 146 | 148 |
| 147 // Toggles app list. | 149 // Toggles app list. |
| 148 void ToggleAppList(); | 150 void ToggleAppList(); |
| 149 | 151 |
| 150 // Sets the desktop background mode. | 152 // Sets the desktop background wallpaper. |
| 151 void SetDesktopBackgroundMode(BackgroundMode mode); | 153 void SetDesktopBackgroundWallpaper(const SkBitmap& wallpaper); |
| 154 |
| 155 // Sets the desktop background (image mode). |
| 156 void SetDesktopBackgroundImageMode(const SkBitmap& wallpaper); |
| 157 |
| 158 // Sets the desktop background (solid color mode). |
| 159 void SetDesktopBackgroundSolidColorMode(); |
| 152 | 160 |
| 153 // Returns true if the screen is locked. | 161 // Returns true if the screen is locked. |
| 154 bool IsScreenLocked() const; | 162 bool IsScreenLocked() const; |
| 155 | 163 |
| 156 // Returns true if a modal dialog window is currently open. | 164 // Returns true if a modal dialog window is currently open. |
| 157 bool IsModalWindowOpen() const; | 165 bool IsModalWindowOpen() const; |
| 158 | 166 |
| 159 // See enum WindowMode for details. | 167 // See enum WindowMode for details. |
| 160 bool IsWindowModeCompact() const { return window_mode_ == MODE_COMPACT; } | 168 bool IsWindowModeCompact() const { return window_mode_ == MODE_COMPACT; } |
| 161 | 169 |
| (...skipping 17 matching lines...) Expand all Loading... |
| 179 | 187 |
| 180 internal::RootWindowEventFilter* root_filter() { | 188 internal::RootWindowEventFilter* root_filter() { |
| 181 return root_filter_; | 189 return root_filter_; |
| 182 } | 190 } |
| 183 internal::TooltipController* tooltip_controller() { | 191 internal::TooltipController* tooltip_controller() { |
| 184 return tooltip_controller_.get(); | 192 return tooltip_controller_.get(); |
| 185 } | 193 } |
| 186 internal::PartialScreenshotEventFilter* partial_screenshot_filter() { | 194 internal::PartialScreenshotEventFilter* partial_screenshot_filter() { |
| 187 return partial_screenshot_filter_.get(); | 195 return partial_screenshot_filter_.get(); |
| 188 } | 196 } |
| 197 DesktopBackgroundController* desktop_background_controller() { |
| 198 return desktop_background_controller_.get(); |
| 199 } |
| 189 PowerButtonController* power_button_controller() { | 200 PowerButtonController* power_button_controller() { |
| 190 return power_button_controller_.get(); | 201 return power_button_controller_.get(); |
| 191 } | 202 } |
| 192 VideoDetector* video_detector() { | 203 VideoDetector* video_detector() { |
| 193 return video_detector_.get(); | 204 return video_detector_.get(); |
| 194 } | 205 } |
| 195 WindowCycleController* window_cycle_controller() { | 206 WindowCycleController* window_cycle_controller() { |
| 196 return window_cycle_controller_.get(); | 207 return window_cycle_controller_.get(); |
| 197 } | 208 } |
| 198 AudioController* audio_controller() const { | 209 AudioController* audio_controller() const { |
| (...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 275 scoped_ptr<internal::AppList> app_list_; | 286 scoped_ptr<internal::AppList> app_list_; |
| 276 | 287 |
| 277 scoped_ptr<internal::StackingController> stacking_controller_; | 288 scoped_ptr<internal::StackingController> stacking_controller_; |
| 278 scoped_ptr<internal::ActivationController> activation_controller_; | 289 scoped_ptr<internal::ActivationController> activation_controller_; |
| 279 scoped_ptr<internal::WindowModalityController> window_modality_controller_; | 290 scoped_ptr<internal::WindowModalityController> window_modality_controller_; |
| 280 scoped_ptr<internal::DragDropController> drag_drop_controller_; | 291 scoped_ptr<internal::DragDropController> drag_drop_controller_; |
| 281 scoped_ptr<internal::WorkspaceController> workspace_controller_; | 292 scoped_ptr<internal::WorkspaceController> workspace_controller_; |
| 282 scoped_ptr<internal::ShadowController> shadow_controller_; | 293 scoped_ptr<internal::ShadowController> shadow_controller_; |
| 283 scoped_ptr<internal::TooltipController> tooltip_controller_; | 294 scoped_ptr<internal::TooltipController> tooltip_controller_; |
| 284 scoped_ptr<internal::VisibilityController> visibility_controller_; | 295 scoped_ptr<internal::VisibilityController> visibility_controller_; |
| 296 scoped_ptr<DesktopBackgroundController> desktop_background_controller_; |
| 285 scoped_ptr<PowerButtonController> power_button_controller_; | 297 scoped_ptr<PowerButtonController> power_button_controller_; |
| 286 scoped_ptr<VideoDetector> video_detector_; | 298 scoped_ptr<VideoDetector> video_detector_; |
| 287 scoped_ptr<WindowCycleController> window_cycle_controller_; | 299 scoped_ptr<WindowCycleController> window_cycle_controller_; |
| 288 scoped_ptr<internal::FocusCycler> focus_cycler_; | 300 scoped_ptr<internal::FocusCycler> focus_cycler_; |
| 289 | 301 |
| 290 // These controllers are not owned by the shell. | 302 // These controllers are not owned by the shell. |
| 291 AudioController* audio_controller_; | 303 AudioController* audio_controller_; |
| 292 BrightnessController* brightness_controller_; | 304 BrightnessController* brightness_controller_; |
| 293 PowerStatusController* power_status_controller_; | 305 PowerStatusController* power_status_controller_; |
| 294 | 306 |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 328 // Offset between the corner of the status area and the corner of the screen | 340 // Offset between the corner of the status area and the corner of the screen |
| 329 // when in the compact window mode. | 341 // when in the compact window mode. |
| 330 gfx::Size compact_status_area_offset_; | 342 gfx::Size compact_status_area_offset_; |
| 331 | 343 |
| 332 DISALLOW_COPY_AND_ASSIGN(Shell); | 344 DISALLOW_COPY_AND_ASSIGN(Shell); |
| 333 }; | 345 }; |
| 334 | 346 |
| 335 } // namespace ash | 347 } // namespace ash |
| 336 | 348 |
| 337 #endif // ASH_SHELL_H_ | 349 #endif // ASH_SHELL_H_ |
| OLD | NEW |