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_DESKTOP_BACKGROUND_DESKTOP_BACKGROUND_CONTROLLER_H_ | 5 #ifndef ASH_DESKTOP_BACKGROUND_DESKTOP_BACKGROUND_CONTROLLER_H_ |
6 #define ASH_DESKTOP_BACKGROUND_DESKTOP_BACKGROUND_CONTROLLER_H_ | 6 #define ASH_DESKTOP_BACKGROUND_DESKTOP_BACKGROUND_CONTROLLER_H_ |
7 | 7 |
8 #include "ash/ash_export.h" | 8 #include "ash/ash_export.h" |
9 #include "ash/display/display_controller.h" | 9 #include "ash/display/display_controller.h" |
10 #include "ash/shell_observer.h" | 10 #include "ash/shell_observer.h" |
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
51 public ShellObserver { | 51 public ShellObserver { |
52 public: | 52 public: |
53 class TestAPI; | 53 class TestAPI; |
54 | 54 |
55 enum BackgroundMode { | 55 enum BackgroundMode { |
56 BACKGROUND_NONE, | 56 BACKGROUND_NONE, |
57 BACKGROUND_IMAGE, | 57 BACKGROUND_IMAGE, |
58 }; | 58 }; |
59 | 59 |
60 DesktopBackgroundController(); | 60 DesktopBackgroundController(); |
61 virtual ~DesktopBackgroundController(); | 61 ~DesktopBackgroundController() override; |
62 | 62 |
63 BackgroundMode desktop_background_mode() const { | 63 BackgroundMode desktop_background_mode() const { |
64 return desktop_background_mode_; | 64 return desktop_background_mode_; |
65 } | 65 } |
66 | 66 |
67 // Add/Remove observers. | 67 // Add/Remove observers. |
68 void AddObserver(DesktopBackgroundControllerObserver* observer); | 68 void AddObserver(DesktopBackgroundControllerObserver* observer); |
69 void RemoveObserver(DesktopBackgroundControllerObserver* observer); | 69 void RemoveObserver(DesktopBackgroundControllerObserver* observer); |
70 | 70 |
71 // Provides current image on the background, or empty gfx::ImageSkia if there | 71 // Provides current image on the background, or empty gfx::ImageSkia if there |
(...skipping 18 matching lines...) Expand all Loading... |
90 | 90 |
91 // Move all desktop widgets to locked container. | 91 // Move all desktop widgets to locked container. |
92 // Returns true if the desktop moved. | 92 // Returns true if the desktop moved. |
93 bool MoveDesktopToLockedContainer(); | 93 bool MoveDesktopToLockedContainer(); |
94 | 94 |
95 // Move all desktop widgets to unlocked container. | 95 // Move all desktop widgets to unlocked container. |
96 // Returns true if the desktop moved. | 96 // Returns true if the desktop moved. |
97 bool MoveDesktopToUnlockedContainer(); | 97 bool MoveDesktopToUnlockedContainer(); |
98 | 98 |
99 // DisplayController::Observer: | 99 // DisplayController::Observer: |
100 virtual void OnDisplayConfigurationChanged() override; | 100 void OnDisplayConfigurationChanged() override; |
101 | 101 |
102 // ShellObserver: | 102 // ShellObserver: |
103 virtual void OnRootWindowAdded(aura::Window* root_window) override; | 103 void OnRootWindowAdded(aura::Window* root_window) override; |
104 | 104 |
105 // Returns the maximum size of all displays combined in native | 105 // Returns the maximum size of all displays combined in native |
106 // resolutions. Note that this isn't the bounds of the display who | 106 // resolutions. Note that this isn't the bounds of the display who |
107 // has maximum resolutions. Instead, this returns the size of the | 107 // has maximum resolutions. Instead, this returns the size of the |
108 // maximum width of all displays, and the maximum height of all displays. | 108 // maximum width of all displays, and the maximum height of all displays. |
109 static gfx::Size GetMaxDisplaySizeInNative(); | 109 static gfx::Size GetMaxDisplaySizeInNative(); |
110 | 110 |
111 // Returns true if the specified wallpaper is already stored | 111 // Returns true if the specified wallpaper is already stored |
112 // in |current_wallpaper_|. | 112 // in |current_wallpaper_|. |
113 // If |compare_layouts| is false, layout is ignored. | 113 // If |compare_layouts| is false, layout is ignored. |
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
166 base::OneShotTimer<DesktopBackgroundController> timer_; | 166 base::OneShotTimer<DesktopBackgroundController> timer_; |
167 | 167 |
168 int wallpaper_reload_delay_; | 168 int wallpaper_reload_delay_; |
169 | 169 |
170 DISALLOW_COPY_AND_ASSIGN(DesktopBackgroundController); | 170 DISALLOW_COPY_AND_ASSIGN(DesktopBackgroundController); |
171 }; | 171 }; |
172 | 172 |
173 } // namespace ash | 173 } // namespace ash |
174 | 174 |
175 #endif // ASH_DESKTOP_BACKGROUND_DESKTOP_BACKGROUND_CONTROLLER_H_ | 175 #endif // ASH_DESKTOP_BACKGROUND_DESKTOP_BACKGROUND_CONTROLLER_H_ |
OLD | NEW |