Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(453)

Unified Diff: ash/wallpaper/wallpaper_controller.h

Issue 2832053003: cros: WallpaperController reparent based on session state (Closed)
Patch Set: rebase Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | ash/wallpaper/wallpaper_controller.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/wallpaper/wallpaper_controller.h
diff --git a/ash/wallpaper/wallpaper_controller.h b/ash/wallpaper/wallpaper_controller.h
index 345f469d306dfd91d4d9b1fd615e60f2a7c8f947..e72991f205552ffeb437880e421d59213a960ffa 100644
--- a/ash/wallpaper/wallpaper_controller.h
+++ b/ash/wallpaper/wallpaper_controller.h
@@ -12,7 +12,6 @@
#include "ash/session/session_observer.h"
#include "ash/shell_observer.h"
#include "ash/wm_display_observer.h"
-#include "base/compiler_specific.h"
#include "base/memory/ref_counted.h"
#include "base/observer_list.h"
#include "base/timer/timer.h"
@@ -36,7 +35,13 @@ namespace ash {
class WallpaperControllerObserver;
-// Controls the desktop background wallpaper.
+// Controls the desktop background wallpaper:
+// - Sets a wallpaper image and layout;
+// - Handles display change (add/remove display, configuration change etc);
+// - Calculates prominent color for shelf;
+// - Move wallpaper to locked container(s) when session state is not ACTIVE to
+// hide the user desktop and move it to unlocked container when session
+// state is ACTIVE;
class ASH_EXPORT WallpaperController
: public NON_EXPORTED_BASE(mojom::WallpaperController),
public WmDisplayObserver,
@@ -83,14 +88,6 @@ class ASH_EXPORT WallpaperController
// crashes. An example test is SystemGestureEventFilterTest.ThreeFingerSwipe.
void CreateEmptyWallpaper();
- // Move all wallpaper widgets to the locked container.
- // Returns true if the wallpaper moved.
- bool MoveToLockedContainer();
-
- // Move all wallpaper widgets to unlocked container.
- // Returns true if the wallpaper moved.
- bool MoveToUnlockedContainer();
-
// WmDisplayObserver:
void OnDisplayConfigurationChanged() override;
@@ -132,6 +129,9 @@ class ASH_EXPORT WallpaperController
void OnColorCalculationComplete() override;
private:
+ FRIEND_TEST_ALL_PREFIXES(WallpaperControllerTest, BasicReparenting);
+ FRIEND_TEST_ALL_PREFIXES(WallpaperControllerTest,
+ WallpaperMovementDuringUnlock);
friend class WallpaperControllerTest;
// Creates a WallpaperWidgetController for |root_window|.
@@ -165,6 +165,14 @@ class ASH_EXPORT WallpaperController
// system state (e.g. wallpaper image, SessionState, etc.).
bool ShouldCalculateColors() const;
+ // Move all wallpaper widgets to the locked container.
+ // Returns true if the wallpaper moved.
+ bool MoveToLockedContainer();
+
+ // Move all wallpaper widgets to unlocked container.
+ // Returns true if the wallpaper moved.
+ bool MoveToUnlockedContainer();
+
bool locked_;
WallpaperMode wallpaper_mode_;
« no previous file with comments | « no previous file | ash/wallpaper/wallpaper_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698