Chromium Code Reviews| 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 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 127 void AddRootWindowEventFilter(aura::EventFilter* filter); | 129 void AddRootWindowEventFilter(aura::EventFilter* filter); |
| 128 void RemoveRootWindowEventFilter(aura::EventFilter* filter); | 130 void RemoveRootWindowEventFilter(aura::EventFilter* filter); |
| 129 size_t GetRootWindowEventFilterCount() const; | 131 size_t GetRootWindowEventFilterCount() const; |
| 130 | 132 |
| 131 // Shows the background menu over |widget|. | 133 // Shows the background menu over |widget|. |
| 132 void ShowBackgroundMenu(views::Widget* widget, const gfx::Point& location); | 134 void ShowBackgroundMenu(views::Widget* widget, const gfx::Point& location); |
| 133 | 135 |
| 134 // Toggles app list. | 136 // Toggles app list. |
| 135 void ToggleAppList(); | 137 void ToggleAppList(); |
| 136 | 138 |
| 137 // Sets the desktop background mode. | 139 // Sets the desktop background wallpaper. |
|
Ben Goodger (Google)
2012/03/09 23:20:17
Can we pull all of this off onto a DesktopBackgrou
bshe
2012/03/12 00:14:25
Done. I am not sure if you mean to pull the follow
| |
| 138 void SetDesktopBackgroundMode(BackgroundMode mode); | 140 void SetDesktopBackgroundWallpaper(const SkBitmap& wallpaper); |
| 141 | |
| 142 // Sets the desktop background (image mode). | |
| 143 void SetDesktopBackgroundImageMode(const SkBitmap& wallpaper); | |
| 144 | |
| 145 // Sets the desktop background (solid color mode). | |
| 146 void SetDesktopBackgroundSolidColorMode(); | |
| 139 | 147 |
| 140 // Returns true if the screen is locked. | 148 // Returns true if the screen is locked. |
| 141 bool IsScreenLocked() const; | 149 bool IsScreenLocked() const; |
| 142 | 150 |
| 143 // Returns true if a modal dialog window is currently open. | 151 // Returns true if a modal dialog window is currently open. |
| 144 bool IsModalWindowOpen() const; | 152 bool IsModalWindowOpen() const; |
| 145 | 153 |
| 146 // Creates a default views::NonClientFrameView for use by windows in the | 154 // Creates a default views::NonClientFrameView for use by windows in the |
| 147 // Ash environment. | 155 // Ash environment. |
| 148 views::NonClientFrameView* CreateDefaultNonClientFrameView( | 156 views::NonClientFrameView* CreateDefaultNonClientFrameView( |
| (...skipping 10 matching lines...) Expand all Loading... | |
| 159 | 167 |
| 160 internal::RootWindowEventFilter* root_filter() { | 168 internal::RootWindowEventFilter* root_filter() { |
| 161 return root_filter_; | 169 return root_filter_; |
| 162 } | 170 } |
| 163 internal::TooltipController* tooltip_controller() { | 171 internal::TooltipController* tooltip_controller() { |
| 164 return tooltip_controller_.get(); | 172 return tooltip_controller_.get(); |
| 165 } | 173 } |
| 166 internal::PartialScreenshotEventFilter* partial_screenshot_filter() { | 174 internal::PartialScreenshotEventFilter* partial_screenshot_filter() { |
| 167 return partial_screenshot_filter_.get(); | 175 return partial_screenshot_filter_.get(); |
| 168 } | 176 } |
| 177 DesktopBackgroundController* desktop_background_controller() { | |
| 178 return desktop_background_controller_.get(); | |
| 179 } | |
| 169 PowerButtonController* power_button_controller() { | 180 PowerButtonController* power_button_controller() { |
| 170 return power_button_controller_.get(); | 181 return power_button_controller_.get(); |
| 171 } | 182 } |
| 172 VideoDetector* video_detector() { | 183 VideoDetector* video_detector() { |
| 173 return video_detector_.get(); | 184 return video_detector_.get(); |
| 174 } | 185 } |
| 175 WindowCycleController* window_cycle_controller() { | 186 WindowCycleController* window_cycle_controller() { |
| 176 return window_cycle_controller_.get(); | 187 return window_cycle_controller_.get(); |
| 177 } | 188 } |
| 178 internal::FocusCycler* focus_cycler() { | 189 internal::FocusCycler* focus_cycler() { |
| (...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 249 scoped_ptr<internal::AppList> app_list_; | 260 scoped_ptr<internal::AppList> app_list_; |
| 250 | 261 |
| 251 scoped_ptr<internal::StackingController> stacking_controller_; | 262 scoped_ptr<internal::StackingController> stacking_controller_; |
| 252 scoped_ptr<internal::ActivationController> activation_controller_; | 263 scoped_ptr<internal::ActivationController> activation_controller_; |
| 253 scoped_ptr<internal::WindowModalityController> window_modality_controller_; | 264 scoped_ptr<internal::WindowModalityController> window_modality_controller_; |
| 254 scoped_ptr<internal::DragDropController> drag_drop_controller_; | 265 scoped_ptr<internal::DragDropController> drag_drop_controller_; |
| 255 scoped_ptr<internal::WorkspaceController> workspace_controller_; | 266 scoped_ptr<internal::WorkspaceController> workspace_controller_; |
| 256 scoped_ptr<internal::ShadowController> shadow_controller_; | 267 scoped_ptr<internal::ShadowController> shadow_controller_; |
| 257 scoped_ptr<internal::TooltipController> tooltip_controller_; | 268 scoped_ptr<internal::TooltipController> tooltip_controller_; |
| 258 scoped_ptr<internal::VisibilityController> visibility_controller_; | 269 scoped_ptr<internal::VisibilityController> visibility_controller_; |
| 270 scoped_ptr<DesktopBackgroundController> desktop_background_controller_; | |
| 259 scoped_ptr<PowerButtonController> power_button_controller_; | 271 scoped_ptr<PowerButtonController> power_button_controller_; |
| 260 scoped_ptr<VideoDetector> video_detector_; | 272 scoped_ptr<VideoDetector> video_detector_; |
| 261 scoped_ptr<WindowCycleController> window_cycle_controller_; | 273 scoped_ptr<WindowCycleController> window_cycle_controller_; |
| 262 scoped_ptr<internal::FocusCycler> focus_cycler_; | 274 scoped_ptr<internal::FocusCycler> focus_cycler_; |
| 263 | 275 |
| 264 // These controllers are not owned by the shell. | 276 // These controllers are not owned by the shell. |
| 265 AudioController* audio_controller_; | 277 AudioController* audio_controller_; |
| 266 BrightnessController* brightness_controller_; | 278 BrightnessController* brightness_controller_; |
| 267 PowerStatusController* power_status_controller_; | 279 PowerStatusController* power_status_controller_; |
| 268 | 280 |
| (...skipping 26 matching lines...) Expand all Loading... | |
| 295 // System tray with clock, Wi-Fi signal, etc. (a replacement in progress for | 307 // System tray with clock, Wi-Fi signal, etc. (a replacement in progress for |
| 296 // |status_widget_|). | 308 // |status_widget_|). |
| 297 scoped_ptr<SystemTray> tray_; | 309 scoped_ptr<SystemTray> tray_; |
| 298 | 310 |
| 299 DISALLOW_COPY_AND_ASSIGN(Shell); | 311 DISALLOW_COPY_AND_ASSIGN(Shell); |
| 300 }; | 312 }; |
| 301 | 313 |
| 302 } // namespace ash | 314 } // namespace ash |
| 303 | 315 |
| 304 #endif // ASH_SHELL_H_ | 316 #endif // ASH_SHELL_H_ |
| OLD | NEW |