Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(10)

Side by Side Diff: ash/common/shelf/shelf_widget.cc

Issue 2302673002: mash: Avoid shelf crashes on display removal. (Closed)
Patch Set: Sync and rebase; remove Screen/Display changes; cleanup. Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « ash/common/shelf/shelf_layout_manager.cc ('k') | ash/mus/bridge/wm_shelf_mus.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « ash/common/shelf/shelf_layout_manager.cc ('k') | ash/mus/bridge/wm_shelf_mus.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698