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

Unified Diff: ash/wm/power_button_controller.cc

Issue 10263015: ash: Resize PowerButtonController background layer. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: merge Created 8 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 | « ash/wm/power_button_controller.h ('k') | ash/wm/power_button_controller_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/wm/power_button_controller.cc
diff --git a/ash/wm/power_button_controller.cc b/ash/wm/power_button_controller.cc
index 885d3dde361799abef56dda6e048f00096ed5d62..9478de8a741d3ab435fff313eb418edfbca0b137 100644
--- a/ash/wm/power_button_controller.cc
+++ b/ash/wm/power_button_controller.cc
@@ -275,6 +275,11 @@ bool PowerButtonController::TestApi::BackgroundLayerIsVisible() const {
controller_->background_layer_->visible();
}
+gfx::Rect PowerButtonController::TestApi::GetBackgroundLayerBounds() const {
+ ui::Layer* layer = controller_->background_layer_.get();
+ return layer ? layer->bounds() : gfx::Rect();
+}
+
PowerButtonController::PowerButtonController()
: login_status_(user::LOGGED_IN_NONE),
unlocked_login_status_(user::LOGGED_IN_NONE),
@@ -284,9 +289,11 @@ PowerButtonController::PowerButtonController()
has_legacy_power_button_(
CommandLine::ForCurrentProcess()->HasSwitch(
switches::kAuraLegacyPowerButton)) {
+ Shell::GetInstance()->GetRootWindow()->AddRootWindowObserver(this);
}
PowerButtonController::~PowerButtonController() {
+ Shell::GetInstance()->GetRootWindow()->RemoveRootWindowObserver(this);
}
void PowerButtonController::OnLoginStateChanged(user::LoginStatus status) {
« no previous file with comments | « ash/wm/power_button_controller.h ('k') | ash/wm/power_button_controller_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698