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

Side by Side Diff: ash/root_window_controller.cc

Issue 2401803002: Moves Shell::ShowShelf() to WmShell (Closed)
Patch Set: Created 4 years, 2 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/shell.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 <queue> 7 #include <queue>
8 #include <vector> 8 #include <vector>
9 9
10 #include "ash/aura/aura_layout_manager_adapter.h" 10 #include "ash/aura/aura_layout_manager_adapter.h"
(...skipping 293 matching lines...) Expand 10 before | Expand all | Expand 10 after
304 } 304 }
305 305
306 aura::Window* RootWindowController::GetContainer(int container_id) { 306 aura::Window* RootWindowController::GetContainer(int container_id) {
307 return GetRootWindow()->GetChildById(container_id); 307 return GetRootWindow()->GetChildById(container_id);
308 } 308 }
309 309
310 const aura::Window* RootWindowController::GetContainer(int container_id) const { 310 const aura::Window* RootWindowController::GetContainer(int container_id) const {
311 return ash_host_->AsWindowTreeHost()->window()->GetChildById(container_id); 311 return ash_host_->AsWindowTreeHost()->window()->GetChildById(container_id);
312 } 312 }
313 313
314 void RootWindowController::ShowShelf() {
315 if (!wm_shelf_aura_->IsShelfInitialized())
316 return;
317 // TODO(jamescook): Move this into WmShelf.
318 wm_shelf_aura_->shelf_widget()->SetShelfVisibility(true);
319 wm_shelf_aura_->shelf_widget()->status_area_widget()->Show();
320 }
321
322 void RootWindowController::CreateShelf() { 314 void RootWindowController::CreateShelf() {
323 if (wm_shelf_aura_->IsShelfInitialized()) 315 if (wm_shelf_aura_->IsShelfInitialized())
324 return; 316 return;
325 wm_shelf_aura_->InitializeShelf(); 317 wm_shelf_aura_->InitializeShelf();
326 318
327 if (panel_layout_manager()) 319 if (panel_layout_manager())
328 panel_layout_manager()->SetShelf(wm_shelf_aura_.get()); 320 panel_layout_manager()->SetShelf(wm_shelf_aura_.get());
329 if (docked_window_layout_manager()) { 321 if (docked_window_layout_manager()) {
330 docked_window_layout_manager()->SetShelf(wm_shelf_aura_.get()); 322 docked_window_layout_manager()->SetShelf(wm_shelf_aura_.get());
331 if (wm_shelf_aura_->shelf_layout_manager()) { 323 if (wm_shelf_aura_->shelf_layout_manager()) {
(...skipping 325 matching lines...) Expand 10 before | Expand all | Expand 10 after
657 EnableTouchHudProjection(); 649 EnableTouchHudProjection();
658 else 650 else
659 DisableTouchHudProjection(); 651 DisableTouchHudProjection();
660 } 652 }
661 653
662 RootWindowController* GetRootWindowController(const aura::Window* root_window) { 654 RootWindowController* GetRootWindowController(const aura::Window* root_window) {
663 return root_window ? GetRootWindowSettings(root_window)->controller : nullptr; 655 return root_window ? GetRootWindowSettings(root_window)->controller : nullptr;
664 } 656 }
665 657
666 } // namespace ash 658 } // namespace ash
OLDNEW
« no previous file with comments | « ash/root_window_controller.h ('k') | ash/shell.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698