Index: ui/aura_shell/shelf_layout_controller.cc |
diff --git a/ui/aura_shell/shelf_layout_controller.cc b/ui/aura_shell/shelf_layout_controller.cc |
index 9e8d01ac6c588febe8eadc30e30718bfdd1b6db0..f04625d2ee3dbf2216076a0b7ddb13b39c7f3d51 100644 |
--- a/ui/aura_shell/shelf_layout_controller.cc |
+++ b/ui/aura_shell/shelf_layout_controller.cc |
@@ -21,21 +21,21 @@ ui::Layer* GetLayer(views::Widget* widget) { |
} // namespace |
-ShelfLayoutController::ShelfLayoutController(views::Widget* launcher, |
- views::Widget* status) |
+ShelfLayoutController::ShelfLayoutController(views::Widget* launcher_widget, |
+ views::Widget* status_widget) |
: animating_(false), |
visible_(true), |
max_height_(-1), |
- launcher_(launcher), |
- status_(status) { |
- gfx::Rect launcher_bounds = launcher->GetWindowScreenBounds(); |
- gfx::Rect status_bounds = status->GetWindowScreenBounds(); |
+ launcher_widget_(launcher_widget), |
+ status_widget_(status_widget) { |
+ gfx::Rect launcher_bounds = launcher_widget->GetWindowScreenBounds(); |
+ gfx::Rect status_bounds = status_widget->GetWindowScreenBounds(); |
max_height_ = std::max(launcher_bounds.height(), status_bounds.height()); |
- GetLayer(launcher)->GetAnimator()->AddObserver(this); |
+ GetLayer(launcher_widget)->GetAnimator()->AddObserver(this); |
} |
ShelfLayoutController::~ShelfLayoutController() { |
- GetLayer(launcher_)->GetAnimator()->RemoveObserver(this); |
+ GetLayer(launcher_widget_)->GetAnimator()->RemoveObserver(this); |
} |
void ShelfLayoutController::LayoutShelf() { |
@@ -43,10 +43,10 @@ void ShelfLayoutController::LayoutShelf() { |
TargetBounds target_bounds; |
float target_opacity = visible_ ? 1.0f : 0.0f; |
CalculateTargetBounds(visible_, &target_bounds); |
- GetLayer(launcher_)->SetOpacity(target_opacity); |
- GetLayer(status_)->SetOpacity(target_opacity); |
- launcher_->SetBounds(target_bounds.launcher_bounds); |
- status_->SetBounds(target_bounds.status_bounds); |
+ GetLayer(launcher_widget_)->SetOpacity(target_opacity); |
+ GetLayer(status_widget_)->SetOpacity(target_opacity); |
+ launcher_widget_->SetBounds(target_bounds.launcher_bounds); |
+ status_widget_->SetBounds(target_bounds.status_bounds); |
aura::Desktop::GetInstance()->screen()->set_work_area_insets( |
target_bounds.work_area_insets); |
} |
@@ -61,8 +61,9 @@ void ShelfLayoutController::SetVisible(bool visible) { |
TargetBounds target_bounds; |
float target_opacity = visible ? 1.0f : 0.0f; |
CalculateTargetBounds(visible, &target_bounds); |
- AnimateWidgetTo(launcher_, target_bounds.launcher_bounds, target_opacity); |
- AnimateWidgetTo(status_, target_bounds.status_bounds, target_opacity); |
+ AnimateWidgetTo( |
+ launcher_widget_, target_bounds.launcher_bounds, target_opacity); |
+ AnimateWidgetTo(status_widget_, target_bounds.status_bounds, target_opacity); |
animating_ = true; |
// |visible_| is updated once the animation completes. |
} |
@@ -72,19 +73,19 @@ void ShelfLayoutController::StopAnimating() { |
animating_ = false; |
visible_ = !visible_; |
} |
- GetLayer(launcher_)->GetAnimator()->StopAnimating(); |
+ GetLayer(launcher_widget_)->GetAnimator()->StopAnimating(); |
} |
void ShelfLayoutController::CalculateTargetBounds(bool visible, |
TargetBounds* target_bounds) { |
const gfx::Rect& available_bounds(aura::Desktop::GetInstance()->bounds()); |
int y = available_bounds.bottom() - (visible ? max_height_ : 0); |
- gfx::Rect status_bounds(status_->GetWindowScreenBounds()); |
+ gfx::Rect status_bounds(status_widget_->GetWindowScreenBounds()); |
target_bounds->status_bounds = gfx::Rect( |
available_bounds.right() - status_bounds.width(), |
y + (max_height_ - status_bounds.height()) / 2, |
status_bounds.width(), status_bounds.height()); |
- gfx::Rect launcher_bounds(launcher_->GetWindowScreenBounds()); |
+ gfx::Rect launcher_bounds(launcher_widget_->GetWindowScreenBounds()); |
target_bounds->launcher_bounds = gfx::Rect( |
available_bounds.x(), y + (max_height_ - launcher_bounds.height()) / 2, |
available_bounds.width() - status_bounds.width(), |