| 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/common/shelf/shelf_widget.h" | 5 #include "ash/common/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 479 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 490 // access it later in shutdown. | 490 // access it later in shutdown. |
| 491 if (shelf_layout_manager_) | 491 if (shelf_layout_manager_) |
| 492 shelf_layout_manager_->PrepareForShutdown(); | 492 shelf_layout_manager_->PrepareForShutdown(); |
| 493 | 493 |
| 494 if (status_area_widget_) { | 494 if (status_area_widget_) { |
| 495 background_animator_.RemoveObserver(status_area_widget_); | 495 background_animator_.RemoveObserver(status_area_widget_); |
| 496 WmShell::Get()->focus_cycler()->RemoveWidget(status_area_widget_); | 496 WmShell::Get()->focus_cycler()->RemoveWidget(status_area_widget_); |
| 497 status_area_widget_->Shutdown(); | 497 status_area_widget_->Shutdown(); |
| 498 status_area_widget_ = nullptr; | 498 status_area_widget_ = nullptr; |
| 499 } | 499 } |
| 500 |
| 501 CloseNow(); |
| 500 } | 502 } |
| 501 | 503 |
| 502 void ShelfWidget::ForceUndimming(bool force) { | 504 void ShelfWidget::ForceUndimming(bool force) { |
| 503 delegate_view_->ForceUndimming(force); | 505 delegate_view_->ForceUndimming(force); |
| 504 } | 506 } |
| 505 | 507 |
| 506 void ShelfWidget::UpdateIconPositionForPanel(WmWindow* panel) { | 508 void ShelfWidget::UpdateIconPositionForPanel(WmWindow* panel) { |
| 507 WmWindow* shelf_window = WmLookup::Get()->GetWindowForWidget(this); | 509 WmWindow* shelf_window = WmLookup::Get()->GetWindowForWidget(this); |
| 508 shelf_view_->UpdatePanelIconPosition( | 510 shelf_view_->UpdatePanelIconPosition( |
| 509 panel->GetIntProperty(WmWindowProperty::SHELF_ID), | 511 panel->GetIntProperty(WmWindowProperty::SHELF_ID), |
| (...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 560 if (shelf_view_) | 562 if (shelf_view_) |
| 561 shelf_view_->UpdateShelfItemBackground(alpha); | 563 shelf_view_->UpdateShelfItemBackground(alpha); |
| 562 } | 564 } |
| 563 | 565 |
| 564 void ShelfWidget::WillDeleteShelfLayoutManager() { | 566 void ShelfWidget::WillDeleteShelfLayoutManager() { |
| 565 shelf_layout_manager_->RemoveObserver(this); | 567 shelf_layout_manager_->RemoveObserver(this); |
| 566 shelf_layout_manager_ = nullptr; | 568 shelf_layout_manager_ = nullptr; |
| 567 } | 569 } |
| 568 | 570 |
| 569 } // namespace ash | 571 } // namespace ash |
| OLD | NEW |