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

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

Issue 1841803002: Cleanup WorkspaceController and WorkspaceLayoutManager. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Keep nullptr comparisons. Created 4 years, 8 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
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/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 602 matching lines...) Expand 10 before | Expand all | Expand 10 after
613 613
614 // The shelf should not take focus when initially shown. 614 // The shelf should not take focus when initially shown.
615 set_focus_on_creation(false); 615 set_focus_on_creation(false);
616 SetContentsView(delegate_view_); 616 SetContentsView(delegate_view_);
617 delegate_view_->SetParentLayer(GetLayer()); 617 delegate_view_->SetParentLayer(GetLayer());
618 618
619 shelf_layout_manager_ = new ShelfLayoutManager(this); 619 shelf_layout_manager_ = new ShelfLayoutManager(this);
620 shelf_layout_manager_->AddObserver(this); 620 shelf_layout_manager_->AddObserver(this);
621 shelf_container->SetLayoutManager(shelf_layout_manager_); 621 shelf_container->SetLayoutManager(shelf_layout_manager_);
622 shelf_layout_manager_->set_workspace_controller(workspace_controller); 622 shelf_layout_manager_->set_workspace_controller(workspace_controller);
623 workspace_controller->SetShelf(shelf_layout_manager_); 623 workspace_controller->set_shelf(shelf_layout_manager_);
624 624
625 status_area_widget_ = new StatusAreaWidget(status_container, this); 625 status_area_widget_ = new StatusAreaWidget(status_container, this);
626 status_area_widget_->CreateTrayViews(); 626 status_area_widget_->CreateTrayViews();
627 if (Shell::GetInstance()->session_state_delegate()-> 627 if (Shell::GetInstance()->session_state_delegate()->
628 IsActiveUserSessionStarted()) { 628 IsActiveUserSessionStarted()) {
629 status_area_widget_->Show(); 629 status_area_widget_->Show();
630 } 630 }
631 Shell::GetInstance()->focus_cycler()->AddWidget(status_area_widget_); 631 Shell::GetInstance()->focus_cycler()->AddWidget(status_area_widget_);
632 632
633 status_container->SetLayoutManager( 633 status_container->SetLayoutManager(
(...skipping 198 matching lines...) Expand 10 before | Expand all | Expand 10 after
832 DCHECK(delegate_view_); 832 DCHECK(delegate_view_);
833 return delegate_view_->disable_dimming_animations_for_test(); 833 return delegate_view_->disable_dimming_animations_for_test();
834 } 834 }
835 835
836 void ShelfWidget::WillDeleteShelf() { 836 void ShelfWidget::WillDeleteShelf() {
837 shelf_layout_manager_->RemoveObserver(this); 837 shelf_layout_manager_->RemoveObserver(this);
838 shelf_layout_manager_ = NULL; 838 shelf_layout_manager_ = NULL;
839 } 839 }
840 840
841 } // namespace ash 841 } // namespace ash
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698