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

Side by Side Diff: ash/root_window_controller.cc

Issue 2907853002: [mus+ash] Removes WmWindow from ash/shelf and ash/shell (Closed)
Patch Set: [mus+ash] Removes WmWindow from ash/shelf and ash/shell (removed some more wm_window.h) Created 3 years, 6 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/root_window_controller.h ('k') | ash/shelf/shelf.h » ('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 (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/root_window_controller.h" 5 #include "ash/root_window_controller.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <queue> 8 #include <queue>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 346 matching lines...) Expand 10 before | Expand all | Expand 10 after
357 shelf_initialized_ = true; 357 shelf_initialized_ = true;
358 shelf_->NotifyShelfInitialized(); 358 shelf_->NotifyShelfInitialized();
359 359
360 // TODO(jamescook): Pass |shelf_| into the constructors for these layout 360 // TODO(jamescook): Pass |shelf_| into the constructors for these layout
361 // managers. 361 // managers.
362 if (panel_layout_manager_) 362 if (panel_layout_manager_)
363 panel_layout_manager_->SetShelf(shelf_.get()); 363 panel_layout_manager_->SetShelf(shelf_.get());
364 364
365 // TODO(jamescook): Eliminate this. Refactor AttachedPanelWidgetTargeter's 365 // TODO(jamescook): Eliminate this. Refactor AttachedPanelWidgetTargeter's
366 // access to Shelf. 366 // access to Shelf.
367 Shell::Get()->NotifyShelfCreatedForRootWindow(WmWindow::Get(GetRootWindow())); 367 Shell::Get()->NotifyShelfCreatedForRootWindow(GetRootWindow());
368 368
369 shelf_->shelf_widget()->PostCreateShelf(); 369 shelf_->shelf_widget()->PostCreateShelf();
370 } 370 }
371 371
372 ShelfLayoutManager* RootWindowController::GetShelfLayoutManager() { 372 ShelfLayoutManager* RootWindowController::GetShelfLayoutManager() {
373 return shelf_->shelf_layout_manager(); 373 return shelf_->shelf_layout_manager();
374 } 374 }
375 375
376 SystemModalContainerLayoutManager* 376 SystemModalContainerLayoutManager*
377 RootWindowController::GetSystemModalLayoutManager(aura::Window* window) { 377 RootWindowController::GetSystemModalLayoutManager(aura::Window* window) {
(...skipping 388 matching lines...) Expand 10 before | Expand all | Expand 10 after
766 if (!base::CommandLine::ForCurrentProcess()->HasSwitch( 766 if (!base::CommandLine::ForCurrentProcess()->HasSwitch(
767 switches::kAshDisableTouchExplorationMode) && 767 switches::kAshDisableTouchExplorationMode) &&
768 Shell::GetAshConfig() != Config::MASH) { 768 Shell::GetAshConfig() != Config::MASH) {
769 touch_exploration_manager_.reset(new AshTouchExplorationManager(this)); 769 touch_exploration_manager_.reset(new AshTouchExplorationManager(this));
770 } 770 }
771 } 771 }
772 772
773 void RootWindowController::InitLayoutManagers() { 773 void RootWindowController::InitLayoutManagers() {
774 // Create the shelf and status area widgets. 774 // Create the shelf and status area widgets.
775 DCHECK(!shelf_->shelf_widget()); 775 DCHECK(!shelf_->shelf_widget());
776 GetShelf()->CreateShelfWidget(GetWindow()); 776 aura::Window* root = GetRootWindow();
777 GetShelf()->CreateShelfWidget(root);
777 778
778 aura::Window* root = GetRootWindow();
779 root_window_layout_manager_ = new wm::RootWindowLayoutManager(root); 779 root_window_layout_manager_ = new wm::RootWindowLayoutManager(root);
780 root->SetLayoutManager(root_window_layout_manager_); 780 root->SetLayoutManager(root_window_layout_manager_);
781 781
782 aura::Window* default_container = 782 aura::Window* default_container =
783 GetContainer(kShellWindowId_DefaultContainer); 783 GetContainer(kShellWindowId_DefaultContainer);
784 // Installs WorkspaceLayoutManager on |default_container|. 784 // Installs WorkspaceLayoutManager on |default_container|.
785 workspace_controller_.reset(new WorkspaceController(default_container)); 785 workspace_controller_.reset(new WorkspaceController(default_container));
786 786
787 aura::Window* modal_container = 787 aura::Window* modal_container =
788 GetContainer(kShellWindowId_SystemModalContainer); 788 GetContainer(kShellWindowId_SystemModalContainer);
(...skipping 291 matching lines...) Expand 10 before | Expand all | Expand 10 after
1080 EnableTouchHudProjection(); 1080 EnableTouchHudProjection();
1081 else 1081 else
1082 DisableTouchHudProjection(); 1082 DisableTouchHudProjection();
1083 } 1083 }
1084 1084
1085 RootWindowController* GetRootWindowController(const aura::Window* root_window) { 1085 RootWindowController* GetRootWindowController(const aura::Window* root_window) {
1086 return root_window ? GetRootWindowSettings(root_window)->controller : nullptr; 1086 return root_window ? GetRootWindowSettings(root_window)->controller : nullptr;
1087 } 1087 }
1088 1088
1089 } // namespace ash 1089 } // namespace ash
OLDNEW
« no previous file with comments | « ash/root_window_controller.h ('k') | ash/shelf/shelf.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698