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

Side by Side Diff: ash/root_window_controller.cc

Issue 2648483002: chromeos: Rename various CreateShelf methods to CreateShelfView (Closed)
Patch Set: Created 3 years, 11 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/content/client/shell_browser_main_parts.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 (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 337 matching lines...) Expand 10 before | Expand all | Expand 10 after
348 } 348 }
349 349
350 bool RootWindowController::HasShelf() { 350 bool RootWindowController::HasShelf() {
351 return wm_shelf_->shelf_widget() != nullptr; 351 return wm_shelf_->shelf_widget() != nullptr;
352 } 352 }
353 353
354 WmShelf* RootWindowController::GetShelf() { 354 WmShelf* RootWindowController::GetShelf() {
355 return wm_shelf_.get(); 355 return wm_shelf_.get();
356 } 356 }
357 357
358 void RootWindowController::CreateShelf() { 358 void RootWindowController::CreateShelfView() {
359 if (wm_shelf_->IsShelfInitialized()) 359 if (wm_shelf_->IsShelfInitialized())
360 return; 360 return;
361 wm_shelf_->InitializeShelf(); 361 wm_shelf_->CreateShelfView();
362 362
363 // TODO(jamescook): Pass |wm_shelf_| into the constructors for these layout
msw 2017/01/19 09:54:26 aside: maybe, unless they depend on the shelf view
James Cook 2017/01/19 17:31:34 Yeah, that's why I didn't do it here. The SetShelf
364 // managers.
363 if (panel_layout_manager_) 365 if (panel_layout_manager_)
364 panel_layout_manager_->SetShelf(wm_shelf_.get()); 366 panel_layout_manager_->SetShelf(wm_shelf_.get());
365 if (docked_window_layout_manager_) { 367 if (docked_window_layout_manager_) {
366 docked_window_layout_manager_->SetShelf(wm_shelf_.get()); 368 docked_window_layout_manager_->SetShelf(wm_shelf_.get());
367 if (wm_shelf_->shelf_layout_manager()) 369 if (wm_shelf_->shelf_layout_manager())
368 docked_window_layout_manager_->AddObserver( 370 docked_window_layout_manager_->AddObserver(
369 wm_shelf_->shelf_layout_manager()); 371 wm_shelf_->shelf_layout_manager());
370 } 372 }
371 373
372 // Notify shell observers that the shelf has been created. 374 // Notify shell observers that the shelf has been created.
(...skipping 420 matching lines...) Expand 10 before | Expand all | Expand 10 after
793 795
794 root_window_layout_manager_->OnWindowResized(); 796 root_window_layout_manager_->OnWindowResized();
795 if (root_window_type == RootWindowType::PRIMARY) { 797 if (root_window_type == RootWindowType::PRIMARY) {
796 if (!wm_shell->IsRunningInMash()) 798 if (!wm_shell->IsRunningInMash())
797 shell->InitKeyboard(); 799 shell->InitKeyboard();
798 } else { 800 } else {
799 window_tree_host_->Show(); 801 window_tree_host_->Show();
800 802
801 // Create a shelf if a user is already logged in. 803 // Create a shelf if a user is already logged in.
802 if (wm_shell->GetSessionStateDelegate()->NumberOfLoggedInUsers()) 804 if (wm_shell->GetSessionStateDelegate()->NumberOfLoggedInUsers())
803 CreateShelf(); 805 CreateShelfView();
804 806
805 // Notify shell observers about new root window. 807 // Notify shell observers about new root window.
806 shell->OnRootWindowAdded(WmWindow::Get(root_window)); 808 shell->OnRootWindowAdded(WmWindow::Get(root_window));
807 } 809 }
808 810
809 // TODO: AshTouchExplorationManager doesn't work with mus. 811 // TODO: AshTouchExplorationManager doesn't work with mus.
810 // http://crbug.com/679782 812 // http://crbug.com/679782
811 if (!base::CommandLine::ForCurrentProcess()->HasSwitch( 813 if (!base::CommandLine::ForCurrentProcess()->HasSwitch(
812 switches::kAshDisableTouchExplorationMode) && 814 switches::kAshDisableTouchExplorationMode) &&
813 !wm_shell->IsRunningInMash()) { 815 !wm_shell->IsRunningInMash()) {
(...skipping 326 matching lines...) Expand 10 before | Expand all | Expand 10 after
1140 EnableTouchHudProjection(); 1142 EnableTouchHudProjection();
1141 else 1143 else
1142 DisableTouchHudProjection(); 1144 DisableTouchHudProjection();
1143 } 1145 }
1144 1146
1145 RootWindowController* GetRootWindowController(const aura::Window* root_window) { 1147 RootWindowController* GetRootWindowController(const aura::Window* root_window) {
1146 return root_window ? GetRootWindowSettings(root_window)->controller : nullptr; 1148 return root_window ? GetRootWindowSettings(root_window)->controller : nullptr;
1147 } 1149 }
1148 1150
1149 } // namespace ash 1151 } // namespace ash
OLDNEW
« no previous file with comments | « ash/root_window_controller.h ('k') | ash/shell/content/client/shell_browser_main_parts.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698