| OLD | NEW |
| 1 // Copyright 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "ash/shelf/shelf_widget.h" | 5 #include "ash/shelf/shelf_widget.h" |
| 6 | 6 |
| 7 #include "ash/animation/animation_change_type.h" | 7 #include "ash/animation/animation_change_type.h" |
| 8 #include "ash/focus_cycler.h" | 8 #include "ash/focus_cycler.h" |
| 9 #include "ash/root_window_controller.h" | 9 #include "ash/root_window_controller.h" |
| 10 #include "ash/session/session_controller.h" | 10 #include "ash/session/session_controller.h" |
| (...skipping 205 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 216 | 216 |
| 217 opaque_foreground->SetOpacity(target_opacity); | 217 opaque_foreground->SetOpacity(target_opacity); |
| 218 } | 218 } |
| 219 | 219 |
| 220 bool ShelfWidget::IsShelfHiddenBehindBlackBar() const { | 220 bool ShelfWidget::IsShelfHiddenBehindBlackBar() const { |
| 221 return delegate_view_->opaque_foreground()->GetTargetOpacity() != 0.0f; | 221 return delegate_view_->opaque_foreground()->GetTargetOpacity() != 0.0f; |
| 222 } | 222 } |
| 223 | 223 |
| 224 void ShelfWidget::OnShelfAlignmentChanged() { | 224 void ShelfWidget::OnShelfAlignmentChanged() { |
| 225 shelf_view_->OnShelfAlignmentChanged(); | 225 shelf_view_->OnShelfAlignmentChanged(); |
| 226 // TODO(jamescook): Status area should not cache alignment. | 226 status_area_widget_->UpdateAfterShelfAlignmentChange(); |
| 227 status_area_widget_->SetShelfAlignment(wm_shelf_->GetAlignment()); | |
| 228 delegate_view_->SchedulePaint(); | 227 delegate_view_->SchedulePaint(); |
| 229 } | 228 } |
| 230 | 229 |
| 231 ShelfView* ShelfWidget::CreateShelfView() { | 230 ShelfView* ShelfWidget::CreateShelfView() { |
| 232 DCHECK(!shelf_view_); | 231 DCHECK(!shelf_view_); |
| 233 | 232 |
| 234 shelf_view_ = new ShelfView(Shell::Get()->shelf_model(), | 233 shelf_view_ = new ShelfView(Shell::Get()->shelf_model(), |
| 235 Shell::Get()->shelf_delegate(), wm_shelf_, this); | 234 Shell::Get()->shelf_delegate(), wm_shelf_, this); |
| 236 shelf_view_->Init(); | 235 shelf_view_->Init(); |
| 237 GetContentsView()->AddChildView(shelf_view_); | 236 GetContentsView()->AddChildView(shelf_view_); |
| (...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 352 if (shelf_view_) | 351 if (shelf_view_) |
| 353 shelf_view_->UpdateShelfItemBackground(color); | 352 shelf_view_->UpdateShelfItemBackground(color); |
| 354 } | 353 } |
| 355 | 354 |
| 356 void ShelfWidget::WillDeleteShelfLayoutManager() { | 355 void ShelfWidget::WillDeleteShelfLayoutManager() { |
| 357 shelf_layout_manager_->RemoveObserver(this); | 356 shelf_layout_manager_->RemoveObserver(this); |
| 358 shelf_layout_manager_ = nullptr; | 357 shelf_layout_manager_ = nullptr; |
| 359 } | 358 } |
| 360 | 359 |
| 361 } // namespace ash | 360 } // namespace ash |
| OLD | NEW |