| 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 203 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 214 | 214 |
| 215 opaque_foreground->SetOpacity(target_opacity); | 215 opaque_foreground->SetOpacity(target_opacity); |
| 216 } | 216 } |
| 217 | 217 |
| 218 bool ShelfWidget::IsShelfHiddenBehindBlackBar() const { | 218 bool ShelfWidget::IsShelfHiddenBehindBlackBar() const { |
| 219 return delegate_view_->opaque_foreground()->GetTargetOpacity() != 0.0f; | 219 return delegate_view_->opaque_foreground()->GetTargetOpacity() != 0.0f; |
| 220 } | 220 } |
| 221 | 221 |
| 222 void ShelfWidget::OnShelfAlignmentChanged() { | 222 void ShelfWidget::OnShelfAlignmentChanged() { |
| 223 shelf_view_->OnShelfAlignmentChanged(); | 223 shelf_view_->OnShelfAlignmentChanged(); |
| 224 // TODO(jamescook): Status area should not cache alignment. | 224 status_area_widget_->UpdateAfterShelfAlignmentChange(); |
| 225 status_area_widget_->SetShelfAlignment(wm_shelf_->GetAlignment()); | |
| 226 delegate_view_->SchedulePaint(); | 225 delegate_view_->SchedulePaint(); |
| 227 } | 226 } |
| 228 | 227 |
| 229 ShelfView* ShelfWidget::CreateShelfView() { | 228 ShelfView* ShelfWidget::CreateShelfView() { |
| 230 DCHECK(!shelf_view_); | 229 DCHECK(!shelf_view_); |
| 231 shelf_view_ = new ShelfView(Shell::Get()->shelf_model(), wm_shelf_, this); | 230 shelf_view_ = new ShelfView(Shell::Get()->shelf_model(), wm_shelf_, this); |
| 232 shelf_view_->Init(); | 231 shelf_view_->Init(); |
| 233 GetContentsView()->AddChildView(shelf_view_); | 232 GetContentsView()->AddChildView(shelf_view_); |
| 234 return shelf_view_; | 233 return shelf_view_; |
| 235 } | 234 } |
| (...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 348 if (shelf_view_) | 347 if (shelf_view_) |
| 349 shelf_view_->UpdateShelfItemBackground(color); | 348 shelf_view_->UpdateShelfItemBackground(color); |
| 350 } | 349 } |
| 351 | 350 |
| 352 void ShelfWidget::WillDeleteShelfLayoutManager() { | 351 void ShelfWidget::WillDeleteShelfLayoutManager() { |
| 353 shelf_layout_manager_->RemoveObserver(this); | 352 shelf_layout_manager_->RemoveObserver(this); |
| 354 shelf_layout_manager_ = nullptr; | 353 shelf_layout_manager_ = nullptr; |
| 355 } | 354 } |
| 356 | 355 |
| 357 } // namespace ash | 356 } // namespace ash |
| OLD | NEW |