| 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/common/focus_cycler.h" | 7 #include "ash/common/focus_cycler.h" |
| 8 #include "ash/common/material_design/material_design_controller.h" | 8 #include "ash/common/material_design/material_design_controller.h" |
| 9 #include "ash/common/session/session_state_delegate.h" | 9 #include "ash/common/session/session_state_delegate.h" |
| 10 #include "ash/common/shelf/shelf_background_animator_observer.h" | 10 #include "ash/common/shelf/shelf_background_animator_observer.h" |
| (...skipping 440 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 451 | 451 |
| 452 bool ShelfWidget::IsShelfVisible() const { | 452 bool ShelfWidget::IsShelfVisible() const { |
| 453 return shelf_view_ && shelf_view_->visible(); | 453 return shelf_view_ && shelf_view_->visible(); |
| 454 } | 454 } |
| 455 | 455 |
| 456 void ShelfWidget::SetShelfVisibility(bool visible) { | 456 void ShelfWidget::SetShelfVisibility(bool visible) { |
| 457 if (shelf_view_) | 457 if (shelf_view_) |
| 458 shelf_view_->SetVisible(visible); | 458 shelf_view_->SetVisible(visible); |
| 459 } | 459 } |
| 460 | 460 |
| 461 bool ShelfWidget::IsShowingContextMenu() const { |
| 462 return shelf_view_ && shelf_view_->IsShowingMenu(); |
| 463 } |
| 464 |
| 465 bool ShelfWidget::IsShowingOverflowBubble() const { |
| 466 return shelf_view_ && shelf_view_->IsShowingOverflowBubble(); |
| 467 } |
| 468 |
| 461 void ShelfWidget::SetFocusCycler(FocusCycler* focus_cycler) { | 469 void ShelfWidget::SetFocusCycler(FocusCycler* focus_cycler) { |
| 462 delegate_view_->set_focus_cycler(focus_cycler); | 470 delegate_view_->set_focus_cycler(focus_cycler); |
| 463 if (focus_cycler) | 471 if (focus_cycler) |
| 464 focus_cycler->AddWidget(this); | 472 focus_cycler->AddWidget(this); |
| 465 } | 473 } |
| 466 | 474 |
| 467 FocusCycler* ShelfWidget::GetFocusCycler() { | 475 FocusCycler* ShelfWidget::GetFocusCycler() { |
| 468 return delegate_view_->focus_cycler(); | 476 return delegate_view_->focus_cycler(); |
| 469 } | 477 } |
| 470 | 478 |
| (...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 522 if (shelf_view_) | 530 if (shelf_view_) |
| 523 shelf_view_->UpdateShelfItemBackground(alpha); | 531 shelf_view_->UpdateShelfItemBackground(alpha); |
| 524 } | 532 } |
| 525 | 533 |
| 526 void ShelfWidget::WillDeleteShelfLayoutManager() { | 534 void ShelfWidget::WillDeleteShelfLayoutManager() { |
| 527 shelf_layout_manager_->RemoveObserver(this); | 535 shelf_layout_manager_->RemoveObserver(this); |
| 528 shelf_layout_manager_ = nullptr; | 536 shelf_layout_manager_ = nullptr; |
| 529 } | 537 } |
| 530 | 538 |
| 531 } // namespace ash | 539 } // namespace ash |
| OLD | NEW |