| 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/focus_cycler.h" | 7 #include "ash/focus_cycler.h" |
| 8 #include "ash/launcher/launcher_delegate.h" | 8 #include "ash/launcher/launcher_delegate.h" |
| 9 #include "ash/launcher/launcher_model.h" | 9 #include "ash/launcher/launcher_model.h" |
| 10 #include "ash/launcher/launcher_navigator.h" | 10 #include "ash/launcher/launcher_navigator.h" |
| (...skipping 523 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 534 | 534 |
| 535 void ShelfWidget::SetAlignment(ShelfAlignment alignment) { | 535 void ShelfWidget::SetAlignment(ShelfAlignment alignment) { |
| 536 if (launcher_) | 536 if (launcher_) |
| 537 launcher_->SetAlignment(alignment); | 537 launcher_->SetAlignment(alignment); |
| 538 status_area_widget_->SetShelfAlignment(alignment); | 538 status_area_widget_->SetShelfAlignment(alignment); |
| 539 delegate_view_->SchedulePaint(); | 539 delegate_view_->SchedulePaint(); |
| 540 } | 540 } |
| 541 | 541 |
| 542 void ShelfWidget::SetDimsShelf(bool dimming) { | 542 void ShelfWidget::SetDimsShelf(bool dimming) { |
| 543 delegate_view_->SetDimmed(dimming); | 543 delegate_view_->SetDimmed(dimming); |
| 544 // Repaint all children, allowing updates to reflect dimmed state eg: |
| 545 // status area background, app list button and overflow button. |
| 544 if (launcher_) | 546 if (launcher_) |
| 545 launcher_->GetAppListButtonView()->SchedulePaint(); | 547 launcher_->SchedulePaint(); |
| 546 status_area_widget_->GetContentsView()->SchedulePaint(); | 548 status_area_widget_->GetContentsView()->SchedulePaint(); |
| 547 } | 549 } |
| 548 | 550 |
| 549 bool ShelfWidget::GetDimsShelf() const { | 551 bool ShelfWidget::GetDimsShelf() const { |
| 550 return delegate_view_->GetDimmed(); | 552 return delegate_view_->GetDimmed(); |
| 551 } | 553 } |
| 552 | 554 |
| 553 void ShelfWidget::CreateLauncher() { | 555 void ShelfWidget::CreateLauncher() { |
| 554 if (launcher_) | 556 if (launcher_) |
| 555 return; | 557 return; |
| (...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 629 return delegate_view_->GetDimmerBoundsForTest(); | 631 return delegate_view_->GetDimmerBoundsForTest(); |
| 630 return gfx::Rect(); | 632 return gfx::Rect(); |
| 631 } | 633 } |
| 632 | 634 |
| 633 void ShelfWidget::DisableDimmingAnimationsForTest() { | 635 void ShelfWidget::DisableDimmingAnimationsForTest() { |
| 634 DCHECK(delegate_view_); | 636 DCHECK(delegate_view_); |
| 635 return delegate_view_->disable_dimming_animations_for_test(); | 637 return delegate_view_->disable_dimming_animations_for_test(); |
| 636 } | 638 } |
| 637 | 639 |
| 638 } // namespace ash | 640 } // namespace ash |
| OLD | NEW |