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

Unified Diff: ash/wm/power_button_controller.cc

Issue 10442017: Rename GetRootWindow() -> GetPrimaryRootWindow() (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: git-try -b linux_chromeos,win_aura Created 8 years, 7 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/partial_screenshot_view.cc ('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 19052194a337d62791e8e78046eef0381f9f152c..a3f1493d49ad6040a79428676f54bbc2ddc896f5 100644
--- a/ash/wm/power_button_controller.cc
+++ b/ash/wm/power_button_controller.cc
@@ -72,7 +72,7 @@ const float kSlowCloseSizeRatio = 0.95f;
// Returns the transform that should be applied to containers for the slow-close
// animation.
ui::Transform GetSlowCloseTransform() {
- gfx::Size root_size = Shell::GetRootWindow()->bounds().size();
+ gfx::Size root_size = Shell::GetPrimaryRootWindow()->bounds().size();
ui::Transform transform;
transform.SetScale(kSlowCloseSizeRatio, kSlowCloseSizeRatio);
transform.ConcatTranslate(
@@ -84,7 +84,7 @@ ui::Transform GetSlowCloseTransform() {
// Returns the transform that should be applied to containers for the fast-close
// animation.
ui::Transform GetFastCloseTransform() {
- gfx::Size root_size = Shell::GetRootWindow()->bounds().size();
+ gfx::Size root_size = Shell::GetPrimaryRootWindow()->bounds().size();
ui::Transform transform;
transform.SetScale(0.0, 0.0);
transform.ConcatTranslate(floor(0.5 * root_size.width() + 0.5),
@@ -290,11 +290,11 @@ PowerButtonController::PowerButtonController()
has_legacy_power_button_(
CommandLine::ForCurrentProcess()->HasSwitch(
switches::kAuraLegacyPowerButton)) {
- Shell::GetInstance()->GetRootWindow()->AddRootWindowObserver(this);
+ Shell::GetPrimaryRootWindow()->AddRootWindowObserver(this);
}
PowerButtonController::~PowerButtonController() {
- Shell::GetInstance()->GetRootWindow()->RemoveRootWindowObserver(this);
+ Shell::GetPrimaryRootWindow()->RemoveRootWindowObserver(this);
}
void PowerButtonController::OnLoginStateChanged(user::LoginStatus status) {
@@ -309,7 +309,7 @@ void PowerButtonController::OnAppTerminating() {
shutting_down_ = true;
ash::Shell::GetInstance()->root_filter()->
set_update_cursor_visibility(false);
- Shell::GetRootWindow()->ShowCursor(false);
+ Shell::GetPrimaryRootWindow()->ShowCursor(false);
ShowBackgroundLayer();
StartAnimation(ALL_CONTAINERS, ANIMATION_HIDE);
}
@@ -533,7 +533,7 @@ void PowerButtonController::StartShutdownAnimationAndRequestShutdown() {
shutting_down_ = true;
ash::Shell::GetInstance()->root_filter()->set_update_cursor_visibility(false);
- Shell::GetRootWindow()->ShowCursor(false);
+ Shell::GetPrimaryRootWindow()->ShowCursor(false);
ShowBackgroundLayer();
if (login_status_ != user::LOGGED_IN_NONE) {
@@ -562,7 +562,7 @@ void PowerButtonController::ShowBackgroundLayer() {
background_layer_.reset(new ui::Layer(ui::LAYER_SOLID_COLOR));
background_layer_->SetColor(SK_ColorBLACK);
- ui::Layer* root_layer = Shell::GetRootWindow()->layer();
+ ui::Layer* root_layer = Shell::GetPrimaryRootWindow()->layer();
background_layer_->SetBounds(root_layer->bounds());
root_layer->Add(background_layer_.get());
root_layer->StackAtBottom(background_layer_.get());
« no previous file with comments | « ash/wm/partial_screenshot_view.cc ('k') | ash/wm/power_button_controller_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698