Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 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/ash_switches.h" | 7 #include "ash/ash_switches.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_state_delegate.h" | 10 #include "ash/session/session_state_delegate.h" |
| (...skipping 700 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 711 delegate_view_->SchedulePaint(); | 711 delegate_view_->SchedulePaint(); |
| 712 } | 712 } |
| 713 | 713 |
| 714 void ShelfWidget::SetDimsShelf(bool dimming) { | 714 void ShelfWidget::SetDimsShelf(bool dimming) { |
| 715 delegate_view_->SetDimmed(dimming); | 715 delegate_view_->SetDimmed(dimming); |
| 716 // Repaint all children, allowing updates to reflect dimmed state eg: | 716 // Repaint all children, allowing updates to reflect dimmed state eg: |
| 717 // status area background, app list button and overflow button. | 717 // status area background, app list button and overflow button. |
| 718 if (shelf_) | 718 if (shelf_) |
| 719 shelf_->SchedulePaint(); | 719 shelf_->SchedulePaint(); |
| 720 status_area_widget_->GetContentsView()->SchedulePaint(); | 720 status_area_widget_->GetContentsView()->SchedulePaint(); |
| 721 status_area_widget_->ShelfDimChanged(); | |
|
flackr
2014/05/30 15:42:15
Maybe this should just be called SchedulePaint, an
jonross
2014/05/30 15:56:06
Done.
| |
| 721 } | 722 } |
| 722 | 723 |
| 723 bool ShelfWidget::GetDimsShelf() const { | 724 bool ShelfWidget::GetDimsShelf() const { |
| 724 return delegate_view_->GetDimmed(); | 725 return delegate_view_->GetDimmed(); |
| 725 } | 726 } |
| 726 | 727 |
| 727 void ShelfWidget::CreateShelf() { | 728 void ShelfWidget::CreateShelf() { |
| 728 if (shelf_) | 729 if (shelf_) |
| 729 return; | 730 return; |
| 730 | 731 |
| (...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 801 DCHECK(delegate_view_); | 802 DCHECK(delegate_view_); |
| 802 return delegate_view_->disable_dimming_animations_for_test(); | 803 return delegate_view_->disable_dimming_animations_for_test(); |
| 803 } | 804 } |
| 804 | 805 |
| 805 void ShelfWidget::WillDeleteShelf() { | 806 void ShelfWidget::WillDeleteShelf() { |
| 806 shelf_layout_manager_->RemoveObserver(this); | 807 shelf_layout_manager_->RemoveObserver(this); |
| 807 shelf_layout_manager_ = NULL; | 808 shelf_layout_manager_ = NULL; |
| 808 } | 809 } |
| 809 | 810 |
| 810 } // namespace ash | 811 } // namespace ash |
| OLD | NEW |