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

Unified Diff: ash/wm/power_button_controller.h

Issue 10909008: Improve existing lock transition - remove black splash. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix Created 8 years, 3 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
Index: ash/wm/power_button_controller.h
diff --git a/ash/wm/power_button_controller.h b/ash/wm/power_button_controller.h
index eee5f1cd9ee832ca9cd4509402e9f008eeddec70..61124bcfb45772d4d064b3e07d34a82d61274db4 100644
--- a/ash/wm/power_button_controller.h
+++ b/ash/wm/power_button_controller.h
@@ -53,13 +53,27 @@ class ASH_EXPORT PowerButtonController : public aura::RootWindowObserver,
ANIMATION_RESTORE,
};
- // Groups of containers that can be animated.
+ // Specific containers or group of containers that can be animated.
Daniel Erat 2012/09/04 16:40:18 nit: s/group/groups/
Nikita (slow) 2012/09/04 17:36:42 Done.
// Exposed here for TestApi::ContainerGroupIsAnimated().
enum ContainerGroup {
- ALL_CONTAINERS = 0,
- SCREEN_LOCKER_CONTAINERS,
- SCREEN_LOCKER_AND_RELATED_CONTAINERS,
- ALL_BUT_SCREEN_LOCKER_AND_RELATED_CONTAINERS,
+ DESKTOP_WALLPAPER = 1 << 0,
Daniel Erat 2012/09/04 16:40:18 use consistent terminology: you're using "backgrou
Nikita (slow) 2012/09/04 17:36:42 Done.
+
+ // All user session related containers including system background but
+ // not including desktop background (wallpaper).
+ NON_LOCK_SCREEN_CONTAINERS = 1 << 1,
+
+ // Desktop wallpaper is moved to this layer when screen is locked.
Daniel Erat 2012/09/04 16:40:18 asked over IM, but perhaps you're not there: i did
Nikita (slow) 2012/09/04 17:36:42 http://codereview.chromium.org/10810039/ Discussed
+ // This layer is excluded from lock animation so that wallpaper stays as is,
+ // user session windows are hidden and lock UI is shown on top of it.
+ // This layer is included in shutdown animation.
+ LOCK_SCREEN_WALLPAPER = 1 << 2,
Daniel Erat 2012/09/04 16:40:18 same background vs. wallpaper issue here
Nikita (slow) 2012/09/04 17:36:42 Done.
+
+ // Lock screen and lock screen modal containers.
+ LOCK_SCREEN_CONTAINERS = 1 << 3,
+
+ // Multiple system layers belong here like status, menu, tooltip
+ // and overlay layers.
+ LOCK_SCREEN_RELATED_CONTAINERS = 1 << 4,
};
// Helper class used by tests to access internal state.
@@ -112,10 +126,10 @@ class ASH_EXPORT PowerButtonController : public aura::RootWindowObserver,
controller_->hide_background_layer_timer_.Stop();
}
- // Returns true if the given set of containers was last animated with
- // |type| (probably; the analysis is fairly ad-hoc).
- bool ContainerGroupIsAnimated(ContainerGroup group,
- AnimationType type) const;
+ // Returns true if containers of a given |container_mask|
+ // was last animated with |type| (probably; the analysis is fairly ad-hoc).
Daniel Erat 2012/09/04 16:40:18 nit: s/was/were/
Nikita (slow) 2012/09/04 17:36:42 Done.
+ // |container_mask| is a bitfield of a ContainerGroup.
Daniel Erat 2012/09/04 16:40:18 nit: s/a ContainerGroup/ContainerGroups/
Nikita (slow) 2012/09/04 17:36:42 As discussed renamed to Container
+ bool ContainerGroupIsAnimated(int container_mask, AnimationType type) const;
Daniel Erat 2012/09/04 16:40:18 nit: s/ContainerGroupIs/ContainerGroupsAre/
Nikita (slow) 2012/09/04 17:36:42 Done.
// Returns true if |background_layer_| is non-NULL and visible.
bool BackgroundLayerIsVisible() const;
@@ -130,6 +144,12 @@ class ASH_EXPORT PowerButtonController : public aura::RootWindowObserver,
DISALLOW_COPY_AND_ASSIGN(TestApi);
};
+ // Helper method that returns bitfield mask of all containers.
Daniel Erat 2012/09/04 16:40:18 nit: s/returns/returns a/
Nikita (slow) 2012/09/04 17:36:42 Done.
+ static int GetAllContainersMask();
+
+ // Helper method that returns bitfield mask of all lock screen containers.
Daniel Erat 2012/09/04 16:40:18 nit: s/returns/returns a/ the comment here makes
Nikita (slow) 2012/09/04 17:36:42 Done.
+ static int GetAllScreenLockContainersMask();
Daniel Erat 2012/09/04 16:40:18 nit: s/ScreenLock/LockScreen/, so this is consiste
Nikita (slow) 2012/09/04 17:36:42 Done.
+
PowerButtonController();
virtual ~PowerButtonController();
@@ -213,10 +233,6 @@ class ASH_EXPORT PowerButtonController : public aura::RootWindowObserver,
// Are we in the process of shutting the machine down?
bool shutting_down_;
- // Should we start |shutdown_timer_| when we receive notification that the
- // screen has been locked?
- bool should_start_shutdown_timer_after_lock_;
Daniel Erat 2012/09/04 16:40:18 thanks for deleting this
-
// Was a command-line switch set telling us that we're running on hardware
// that misreports power button releases?
bool has_legacy_power_button_;

Powered by Google App Engine
This is Rietveld 408576698