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

Side by Side Diff: ash/root_window_controller.cc

Issue 2041233005: Moves ash::user::LoginStatus to ash/common (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: tweaks Created 4 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
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 407 matching lines...) Expand 10 before | Expand all | Expand 10 after
418 Shell::GetInstance()->OnShelfCreatedForRootWindow(GetRootWindow()); 418 Shell::GetInstance()->OnShelfCreatedForRootWindow(GetRootWindow());
419 419
420 shelf_widget_->PostCreateShelf(); 420 shelf_widget_->PostCreateShelf();
421 } 421 }
422 422
423 Shelf* RootWindowController::GetShelf() const { 423 Shelf* RootWindowController::GetShelf() const {
424 // TODO(jamescook): Shelf should be owned by this class, not by ShelfWidget. 424 // TODO(jamescook): Shelf should be owned by this class, not by ShelfWidget.
425 return shelf_widget_->shelf(); 425 return shelf_widget_->shelf();
426 } 426 }
427 427
428 void RootWindowController::UpdateAfterLoginStatusChange( 428 void RootWindowController::UpdateAfterLoginStatusChange(LoginStatus status) {
429 user::LoginStatus status) { 429 if (status != LoginStatus::NOT_LOGGED_IN)
430 if (status != user::LOGGED_IN_NONE)
431 mouse_event_target_.reset(); 430 mouse_event_target_.reset();
432 if (shelf_widget_->status_area_widget()) 431 if (shelf_widget_->status_area_widget())
433 shelf_widget_->status_area_widget()->UpdateAfterLoginStatusChange(status); 432 shelf_widget_->status_area_widget()->UpdateAfterLoginStatusChange(status);
434 } 433 }
435 434
436 void RootWindowController::HandleInitialDesktopBackgroundAnimationStarted() { 435 void RootWindowController::HandleInitialDesktopBackgroundAnimationStarted() {
437 #if defined(OS_CHROMEOS) 436 #if defined(OS_CHROMEOS)
438 if (base::CommandLine::ForCurrentProcess()->HasSwitch( 437 if (base::CommandLine::ForCurrentProcess()->HasSwitch(
439 switches::kAshAnimateFromBootSplashScreen) && 438 switches::kAshAnimateFromBootSplashScreen) &&
440 boot_splash_screen_.get()) { 439 boot_splash_screen_.get()) {
(...skipping 414 matching lines...) Expand 10 before | Expand all | Expand 10 after
855 touch_hud_projection_->Remove(); 854 touch_hud_projection_->Remove();
856 } 855 }
857 856
858 void RootWindowController::OnMenuClosed() { 857 void RootWindowController::OnMenuClosed() {
859 menu_runner_.reset(); 858 menu_runner_.reset();
860 menu_model_adapter_.reset(); 859 menu_model_adapter_.reset();
861 menu_model_.reset(); 860 menu_model_.reset();
862 Shell::GetInstance()->UpdateShelfVisibility(); 861 Shell::GetInstance()->UpdateShelfVisibility();
863 } 862 }
864 863
865 void RootWindowController::OnLoginStateChanged(user::LoginStatus status) { 864 void RootWindowController::OnLoginStateChanged(LoginStatus status) {
866 shelf_widget_->shelf_layout_manager()->UpdateVisibilityState(); 865 shelf_widget_->shelf_layout_manager()->UpdateVisibilityState();
867 } 866 }
868 867
869 void RootWindowController::OnTouchHudProjectionToggled(bool enabled) { 868 void RootWindowController::OnTouchHudProjectionToggled(bool enabled) {
870 if (enabled) 869 if (enabled)
871 EnableTouchHudProjection(); 870 EnableTouchHudProjection();
872 else 871 else
873 DisableTouchHudProjection(); 872 DisableTouchHudProjection();
874 } 873 }
875 874
(...skipping 11 matching lines...) Expand all
887 aura::Window* primary_root_window = Shell::GetInstance() 886 aura::Window* primary_root_window = Shell::GetInstance()
888 ->window_tree_host_manager() 887 ->window_tree_host_manager()
889 ->GetPrimaryRootWindow(); 888 ->GetPrimaryRootWindow();
890 return GetRootWindowSettings(primary_root_window)->controller; 889 return GetRootWindowSettings(primary_root_window)->controller;
891 } 890 }
892 891
893 return GetRootWindowSettings(root_window)->controller; 892 return GetRootWindowSettings(root_window)->controller;
894 } 893 }
895 894
896 } // namespace ash 895 } // namespace ash
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698