| 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_WALLPAPER_WALLPAPER_CONTROLLER_H_ | 5 #ifndef ASH_WALLPAPER_WALLPAPER_CONTROLLER_H_ |
| 6 #define ASH_WALLPAPER_WALLPAPER_CONTROLLER_H_ | 6 #define ASH_WALLPAPER_WALLPAPER_CONTROLLER_H_ |
| 7 | 7 |
| 8 #include <memory> | 8 #include <memory> |
| 9 | 9 |
| 10 #include "ash/ash_export.h" | 10 #include "ash/ash_export.h" |
| (...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 87 // asynchronously. If loading a real wallpaper, there are cases that these | 87 // asynchronously. If loading a real wallpaper, there are cases that these |
| 88 // tests crash because the required widget is not ready. This function | 88 // tests crash because the required widget is not ready. This function |
| 89 // synchronously creates an empty widget for those tests to prevent | 89 // synchronously creates an empty widget for those tests to prevent |
| 90 // crashes. An example test is SystemGestureEventFilterTest.ThreeFingerSwipe. | 90 // crashes. An example test is SystemGestureEventFilterTest.ThreeFingerSwipe. |
| 91 void CreateEmptyWallpaper(); | 91 void CreateEmptyWallpaper(); |
| 92 | 92 |
| 93 // WmDisplayObserver: | 93 // WmDisplayObserver: |
| 94 void OnDisplayConfigurationChanged() override; | 94 void OnDisplayConfigurationChanged() override; |
| 95 | 95 |
| 96 // ShellObserver: | 96 // ShellObserver: |
| 97 void OnRootWindowAdded(WmWindow* root_window) override; | 97 void OnRootWindowAdded(aura::Window* root_window) override; |
| 98 | 98 |
| 99 // SessionObserver: | 99 // SessionObserver: |
| 100 void OnSessionStateChanged(session_manager::SessionState state) override; | 100 void OnSessionStateChanged(session_manager::SessionState state) override; |
| 101 | 101 |
| 102 // Returns the maximum size of all displays combined in native | 102 // Returns the maximum size of all displays combined in native |
| 103 // resolutions. Note that this isn't the bounds of the display who | 103 // resolutions. Note that this isn't the bounds of the display who |
| 104 // has maximum resolutions. Instead, this returns the size of the | 104 // has maximum resolutions. Instead, this returns the size of the |
| 105 // maximum width of all displays, and the maximum height of all displays. | 105 // maximum width of all displays, and the maximum height of all displays. |
| 106 static gfx::Size GetMaxDisplaySizeInNative(); | 106 static gfx::Size GetMaxDisplaySizeInNative(); |
| 107 | 107 |
| (...skipping 22 matching lines...) Expand all Loading... |
| 130 // WallpaperColorCalculatorObserver: | 130 // WallpaperColorCalculatorObserver: |
| 131 void OnColorCalculationComplete() override; | 131 void OnColorCalculationComplete() override; |
| 132 | 132 |
| 133 private: | 133 private: |
| 134 FRIEND_TEST_ALL_PREFIXES(WallpaperControllerTest, BasicReparenting); | 134 FRIEND_TEST_ALL_PREFIXES(WallpaperControllerTest, BasicReparenting); |
| 135 FRIEND_TEST_ALL_PREFIXES(WallpaperControllerTest, | 135 FRIEND_TEST_ALL_PREFIXES(WallpaperControllerTest, |
| 136 WallpaperMovementDuringUnlock); | 136 WallpaperMovementDuringUnlock); |
| 137 friend class WallpaperControllerTest; | 137 friend class WallpaperControllerTest; |
| 138 | 138 |
| 139 // Creates a WallpaperWidgetController for |root_window|. | 139 // Creates a WallpaperWidgetController for |root_window|. |
| 140 void InstallDesktopController(WmWindow* root_window); | 140 void InstallDesktopController(aura::Window* root_window); |
| 141 | 141 |
| 142 // Creates a WallpaperWidgetController for all root windows. | 142 // Creates a WallpaperWidgetController for all root windows. |
| 143 void InstallDesktopControllerForAllWindows(); | 143 void InstallDesktopControllerForAllWindows(); |
| 144 | 144 |
| 145 // Moves the wallpaper to the specified container across all root windows. | 145 // Moves the wallpaper to the specified container across all root windows. |
| 146 // Returns true if a wallpaper moved. | 146 // Returns true if a wallpaper moved. |
| 147 bool ReparentWallpaper(int container); | 147 bool ReparentWallpaper(int container); |
| 148 | 148 |
| 149 // Returns the wallpaper container id for unlocked and locked states. | 149 // Returns the wallpaper container id for unlocked and locked states. |
| 150 int GetWallpaperContainerId(bool locked); | 150 int GetWallpaperContainerId(bool locked); |
| (...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 213 ScopedSessionObserver scoped_session_observer_; | 213 ScopedSessionObserver scoped_session_observer_; |
| 214 | 214 |
| 215 std::unique_ptr<ui::CompositorLock> compositor_lock_; | 215 std::unique_ptr<ui::CompositorLock> compositor_lock_; |
| 216 | 216 |
| 217 DISALLOW_COPY_AND_ASSIGN(WallpaperController); | 217 DISALLOW_COPY_AND_ASSIGN(WallpaperController); |
| 218 }; | 218 }; |
| 219 | 219 |
| 220 } // namespace ash | 220 } // namespace ash |
| 221 | 221 |
| 222 #endif // ASH_WALLPAPER_WALLPAPER_CONTROLLER_H_ | 222 #endif // ASH_WALLPAPER_WALLPAPER_CONTROLLER_H_ |
| OLD | NEW |