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

Unified Diff: ash/wm/power_button_controller.h

Issue 9348089: Make power button controller restore to original transformation on the layer. (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: update Created 8 years, 10 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/wm/power_button_controller.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/wm/power_button_controller.h
diff --git a/ash/wm/power_button_controller.h b/ash/wm/power_button_controller.h
index 9b069b536d92253896dc22e3feef07793c6380b4..1d5e66ed569a2f068cb09a0657c06c3f62c3a062 100644
--- a/ash/wm/power_button_controller.h
+++ b/ash/wm/power_button_controller.h
@@ -6,12 +6,15 @@
#define ASH_WM_POWER_BUTTON_CONTROLLER_H_
#pragma once
+#include <map>
+
#include "ash/ash_export.h"
#include "base/basictypes.h"
#include "base/memory/scoped_ptr.h"
#include "base/time.h"
#include "base/timer.h"
#include "ui/aura/root_window_observer.h"
+#include "ui/aura/window.h"
namespace gfx {
class Size;
@@ -19,6 +22,7 @@ class Size;
namespace ui {
class Layer;
+class Transform;
}
namespace ash {
@@ -152,6 +156,10 @@ class ASH_EXPORT PowerButtonController : public aura::RootWindowObserver {
// aura::RootWindowObserver overrides:
virtual void OnRootWindowResized(const gfx::Size& new_size) OVERRIDE;
+ // Fills |containers| with the containers described by |group|.
+ void GetContainers(ContainerGroup group,
+ aura::Window::Windows* containers);
+
private:
// Requests that the screen be locked and starts |lock_fail_timer_|.
void OnLockTimeout();
@@ -177,6 +185,12 @@ class ASH_EXPORT PowerButtonController : public aura::RootWindowObserver {
void ShowBackgroundLayer();
void HideBackgroundLayer();
+ // Apply animation |type| to all containers described by |group|.
+ void StartAnimation(ContainerGroup group, AnimationType type);
+
+ // Retrieve original transform for |window| stored before animation started.
+ ui::Transform RetrieveOriginalTransform(aura::Window* window);
+
scoped_ptr<PowerButtonControllerDelegate> delegate_;
// True if a non-guest user is currently logged in.
@@ -235,6 +249,10 @@ class ASH_EXPORT PowerButtonController : public aura::RootWindowObserver {
// screen.
base::OneShotTimer<PowerButtonController> hide_background_layer_timer_;
+ // Map from containers to their original layer transforms before animation.
+ typedef std::map<aura::Window*, ui::Transform> WindowTransformsMap;
+ WindowTransformsMap container_transforms_;
+
DISALLOW_COPY_AND_ASSIGN(PowerButtonController);
};
« no previous file with comments | « no previous file | ash/wm/power_button_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698