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

Side by Side Diff: ash/root_window_controller.cc

Issue 115113006: Rename Launcher to Shelf. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: more fixes Created 7 years 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 | Annotate | Revision Log
« no previous file with comments | « ash/root_window_controller.h ('k') | ash/shelf/overflow_bubble.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 <queue> 7 #include <queue>
8 #include <vector> 8 #include <vector>
9 9
10 #include "ash/ash_constants.h" 10 #include "ash/ash_constants.h"
(...skipping 251 matching lines...) Expand 10 before | Expand all | Expand 10 after
262 } 262 }
263 263
264 void RootWindowController::CreateForVirtualKeyboardDisplay( 264 void RootWindowController::CreateForVirtualKeyboardDisplay(
265 aura::RootWindow * root) { 265 aura::RootWindow * root) {
266 RootWindowController* controller = new RootWindowController(root); 266 RootWindowController* controller = new RootWindowController(root);
267 controller->Init(RootWindowController::VIRTUAL_KEYBOARD, 267 controller->Init(RootWindowController::VIRTUAL_KEYBOARD,
268 false /* first run */); 268 false /* first run */);
269 } 269 }
270 270
271 // static 271 // static
272 RootWindowController* RootWindowController::ForLauncher(aura::Window* window) { 272 RootWindowController* RootWindowController::ForShelf(aura::Window* window) {
273 return GetRootWindowController(window->GetRootWindow()); 273 return GetRootWindowController(window->GetRootWindow());
274 } 274 }
275 275
276 // static 276 // static
277 RootWindowController* RootWindowController::ForWindow( 277 RootWindowController* RootWindowController::ForWindow(
278 const aura::Window* window) { 278 const aura::Window* window) {
279 return GetRootWindowController(window->GetRootWindow()); 279 return GetRootWindowController(window->GetRootWindow());
280 } 280 }
281 281
282 // static 282 // static
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after
367 } 367 }
368 368
369 aura::Window* RootWindowController::GetContainer(int container_id) { 369 aura::Window* RootWindowController::GetContainer(int container_id) {
370 return root_window()->GetChildById(container_id); 370 return root_window()->GetChildById(container_id);
371 } 371 }
372 372
373 const aura::Window* RootWindowController::GetContainer(int container_id) const { 373 const aura::Window* RootWindowController::GetContainer(int container_id) const {
374 return root_window_->window()->GetChildById(container_id); 374 return root_window_->window()->GetChildById(container_id);
375 } 375 }
376 376
377 void RootWindowController::ShowLauncher() { 377 void RootWindowController::ShowShelf() {
378 if (!shelf_->launcher()) 378 if (!shelf_->shelf())
379 return; 379 return;
380 shelf_->launcher()->SetVisible(true); 380 shelf_->shelf()->SetVisible(true);
381 shelf_->status_area_widget()->Show(); 381 shelf_->status_area_widget()->Show();
382 } 382 }
383 383
384 void RootWindowController::OnLauncherCreated() { 384 void RootWindowController::OnShelfCreated() {
385 if (panel_layout_manager_) 385 if (panel_layout_manager_)
386 panel_layout_manager_->SetLauncher(shelf_->launcher()); 386 panel_layout_manager_->SetShelf(shelf_->shelf());
387 if (docked_layout_manager_) { 387 if (docked_layout_manager_) {
388 docked_layout_manager_->SetLauncher(shelf_->launcher()); 388 docked_layout_manager_->SetShelf(shelf_->shelf());
389 if (shelf_->shelf_layout_manager()) 389 if (shelf_->shelf_layout_manager())
390 docked_layout_manager_->AddObserver(shelf_->shelf_layout_manager()); 390 docked_layout_manager_->AddObserver(shelf_->shelf_layout_manager());
391 } 391 }
392 } 392 }
393 393
394 void RootWindowController::UpdateAfterLoginStatusChange( 394 void RootWindowController::UpdateAfterLoginStatusChange(
395 user::LoginStatus status) { 395 user::LoginStatus status) {
396 if (status != user::LOGGED_IN_NONE) 396 if (status != user::LOGGED_IN_NONE)
397 mouse_event_target_.reset(); 397 mouse_event_target_.reset();
398 if (shelf_->status_area_widget()) 398 if (shelf_->status_area_widget())
(...skipping 271 matching lines...) Expand 10 before | Expand all | Expand 10 after
670 root_window_layout()->OnWindowResized(); 670 root_window_layout()->OnWindowResized();
671 if (!keyboard::IsKeyboardUsabilityExperimentEnabled()) 671 if (!keyboard::IsKeyboardUsabilityExperimentEnabled())
672 shell->InitKeyboard(); 672 shell->InitKeyboard();
673 } else { 673 } else {
674 root_window_layout()->OnWindowResized(); 674 root_window_layout()->OnWindowResized();
675 shell->desktop_background_controller()->OnRootWindowAdded(root_window()); 675 shell->desktop_background_controller()->OnRootWindowAdded(root_window());
676 shell->high_contrast_controller()->OnRootWindowAdded( 676 shell->high_contrast_controller()->OnRootWindowAdded(
677 root_window_->window()); 677 root_window_->window());
678 root_window_->host()->Show(); 678 root_window_->host()->Show();
679 679
680 // Create a launcher if a user is already logged in. 680 // Create a shelf if a user is already logged in.
681 if (shell->session_state_delegate()->NumberOfLoggedInUsers()) 681 if (shell->session_state_delegate()->NumberOfLoggedInUsers())
682 shelf()->CreateLauncher(); 682 shelf()->CreateShelf();
683 } 683 }
684 684
685 solo_window_tracker_.reset(new SoloWindowTracker(root_window_.get())); 685 solo_window_tracker_.reset(new SoloWindowTracker(root_window_.get()));
686 if (docked_layout_manager_) 686 if (docked_layout_manager_)
687 docked_layout_manager_->AddObserver(solo_window_tracker_.get()); 687 docked_layout_manager_->AddObserver(solo_window_tracker_.get());
688 } 688 }
689 689
690 void RootWindowController::InitLayoutManagers() { 690 void RootWindowController::InitLayoutManagers() {
691 root_window_layout_ = new RootWindowLayoutManager(root_window()); 691 root_window_layout_ = new RootWindowLayoutManager(root_window());
692 root_window()->SetLayoutManager(root_window_layout_); 692 root_window()->SetLayoutManager(root_window_layout_);
(...skipping 282 matching lines...) Expand 10 before | Expand all | Expand 10 after
975 DisableTouchHudProjection(); 975 DisableTouchHudProjection();
976 } 976 }
977 977
978 RootWindowController* GetRootWindowController( 978 RootWindowController* GetRootWindowController(
979 const aura::Window* root_window) { 979 const aura::Window* root_window) {
980 return root_window ? GetRootWindowSettings(root_window)->controller : NULL; 980 return root_window ? GetRootWindowSettings(root_window)->controller : NULL;
981 } 981 }
982 982
983 } // namespace internal 983 } // namespace internal
984 } // namespace ash 984 } // namespace ash
OLDNEW
« no previous file with comments | « ash/root_window_controller.h ('k') | ash/shelf/overflow_bubble.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698