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

Side by Side Diff: chrome/browser/chromeos/login/ui/login_display_host_impl.cc

Issue 2738133003: Promotes a handful of members from WmShell to Shell (Closed)
Patch Set: merge Created 3 years, 9 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "chrome/browser/chromeos/login/ui/login_display_host_impl.h" 5 #include "chrome/browser/chromeos/login/ui/login_display_host_impl.h"
6 6
7 #include <utility> 7 #include <utility>
8 #include <vector> 8 #include <vector>
9 9
10 #include "ash/common/system/tray/system_tray.h" 10 #include "ash/common/system/tray/system_tray.h"
(...skipping 543 matching lines...) Expand 10 before | Expand all | Expand 10 after
554 session_starting_ = true; 554 session_starting_ = true;
555 } 555 }
556 556
557 void LoginDisplayHostImpl::Finalize() { 557 void LoginDisplayHostImpl::Finalize() {
558 DVLOG(1) << "Session starting"; 558 DVLOG(1) << "Session starting";
559 // When adding another user into the session, we defer the wallpaper's 559 // When adding another user into the session, we defer the wallpaper's
560 // animation in order to prevent the flashing of the previous user's windows. 560 // animation in order to prevent the flashing of the previous user's windows.
561 // See crbug.com/541864. 561 // See crbug.com/541864.
562 if (ash::WmShell::HasInstance() && 562 if (ash::WmShell::HasInstance() &&
563 finalize_animation_type_ != ANIMATION_ADD_USER) { 563 finalize_animation_type_ != ANIMATION_ADD_USER) {
564 ash::WmShell::Get()->wallpaper_controller()->MoveToUnlockedContainer(); 564 ash::Shell::GetInstance()
565 ->wallpaper_controller()
566 ->MoveToUnlockedContainer();
565 } 567 }
566 568
567 switch (finalize_animation_type_) { 569 switch (finalize_animation_type_) {
568 case ANIMATION_NONE: 570 case ANIMATION_NONE:
569 ShutdownDisplayHost(false); 571 ShutdownDisplayHost(false);
570 break; 572 break;
571 case ANIMATION_WORKSPACE: 573 case ANIMATION_WORKSPACE:
572 if (ash::Shell::HasInstance()) 574 if (ash::Shell::HasInstance())
573 ScheduleWorkspaceAnimation(); 575 ScheduleWorkspaceAnimation();
574 576
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after
678 // We should emit this signal only at login screen (after reboot or sign out). 680 // We should emit this signal only at login screen (after reboot or sign out).
679 login_view_->set_should_emit_login_prompt_visible(false); 681 login_view_->set_should_emit_login_prompt_visible(false);
680 682
681 if (!ash_util::IsRunningInMash()) { 683 if (!ash_util::IsRunningInMash()) {
682 // Lock container can be transparent after lock screen animation. 684 // Lock container can be transparent after lock screen animation.
683 aura::Window* lock_container = ash::Shell::GetContainer( 685 aura::Window* lock_container = ash::Shell::GetContainer(
684 ash::Shell::GetPrimaryRootWindow(), 686 ash::Shell::GetPrimaryRootWindow(),
685 ash::kShellWindowId_LockScreenContainersContainer); 687 ash::kShellWindowId_LockScreenContainersContainer);
686 lock_container->layer()->SetOpacity(1.0); 688 lock_container->layer()->SetOpacity(1.0);
687 689
688 ash::WmShell::Get()->wallpaper_controller()->MoveToLockedContainer(); 690 ash::Shell::GetInstance()->wallpaper_controller()->MoveToLockedContainer();
689 } else { 691 } else {
690 NOTIMPLEMENTED(); 692 NOTIMPLEMENTED();
691 } 693 }
692 694
693 existing_user_controller_.reset(); // Only one controller in a time. 695 existing_user_controller_.reset(); // Only one controller in a time.
694 existing_user_controller_.reset(new chromeos::ExistingUserController(this)); 696 existing_user_controller_.reset(new chromeos::ExistingUserController(this));
695 697
696 if (!signin_screen_controller_.get()) { 698 if (!signin_screen_controller_.get()) {
697 signin_screen_controller_.reset(new SignInScreenController( 699 signin_screen_controller_.reset(new SignInScreenController(
698 GetOobeUI(), webui_login_display_->delegate())); 700 GetOobeUI(), webui_login_display_->delegate()));
(...skipping 242 matching lines...) Expand 10 before | Expand all | Expand 10 after
941 chrome::NOTIFICATION_CLOSE_ALL_BROWSERS_REQUEST, 943 chrome::NOTIFICATION_CLOSE_ALL_BROWSERS_REQUEST,
942 content::NotificationService::AllSources()); 944 content::NotificationService::AllSources());
943 registrar_.Remove(this, 945 registrar_.Remove(this,
944 chrome::NOTIFICATION_BROWSER_OPENED, 946 chrome::NOTIFICATION_BROWSER_OPENED,
945 content::NotificationService::AllSources()); 947 content::NotificationService::AllSources());
946 } else if (type == chrome::NOTIFICATION_LOGIN_USER_CHANGED && 948 } else if (type == chrome::NOTIFICATION_LOGIN_USER_CHANGED &&
947 user_manager::UserManager::Get()->IsCurrentUserNew()) { 949 user_manager::UserManager::Get()->IsCurrentUserNew()) {
948 if (!ash_util::IsRunningInMash()) { 950 if (!ash_util::IsRunningInMash()) {
949 // For new user, move wallpaper to lock container so that windows created 951 // For new user, move wallpaper to lock container so that windows created
950 // during the user image picker step are below it. 952 // during the user image picker step are below it.
951 ash::WmShell::Get()->wallpaper_controller()->MoveToLockedContainer(); 953 ash::Shell::GetInstance()
954 ->wallpaper_controller()
955 ->MoveToLockedContainer();
952 } else { 956 } else {
953 NOTIMPLEMENTED(); 957 NOTIMPLEMENTED();
954 } 958 }
955 registrar_.Remove(this, 959 registrar_.Remove(this,
956 chrome::NOTIFICATION_LOGIN_USER_CHANGED, 960 chrome::NOTIFICATION_LOGIN_USER_CHANGED,
957 content::NotificationService::AllSources()); 961 content::NotificationService::AllSources());
958 } else if (chrome::NOTIFICATION_WALLPAPER_ANIMATION_FINISHED == type) { 962 } else if (chrome::NOTIFICATION_WALLPAPER_ANIMATION_FINISHED == type) {
959 VLOG(1) << "Login WebUI >> wp animation done"; 963 VLOG(1) << "Login WebUI >> wp animation done";
960 is_wallpaper_loaded_ = true; 964 is_wallpaper_loaded_ = true;
961 if (!ash_util::IsRunningInMash()) { 965 if (!ash_util::IsRunningInMash()) {
(...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after
1111 if (post_quit_task) 1115 if (post_quit_task)
1112 base::MessageLoop::current()->QuitWhenIdle(); 1116 base::MessageLoop::current()->QuitWhenIdle();
1113 1117
1114 if (!completion_callback_.is_null()) 1118 if (!completion_callback_.is_null())
1115 base::ThreadTaskRunnerHandle::Get()->PostTask(FROM_HERE, 1119 base::ThreadTaskRunnerHandle::Get()->PostTask(FROM_HERE,
1116 completion_callback_); 1120 completion_callback_);
1117 1121
1118 if (ash::Shell::HasInstance() && 1122 if (ash::Shell::HasInstance() &&
1119 finalize_animation_type_ == ANIMATION_ADD_USER) { 1123 finalize_animation_type_ == ANIMATION_ADD_USER) {
1120 if (!ash_util::IsRunningInMash()) { 1124 if (!ash_util::IsRunningInMash()) {
1121 ash::WmShell::Get()->wallpaper_controller()->MoveToUnlockedContainer(); 1125 ash::Shell::GetInstance()
1126 ->wallpaper_controller()
1127 ->MoveToUnlockedContainer();
1122 } else { 1128 } else {
1123 NOTIMPLEMENTED(); 1129 NOTIMPLEMENTED();
1124 } 1130 }
1125 } 1131 }
1126 } 1132 }
1127 1133
1128 void LoginDisplayHostImpl::ScheduleWorkspaceAnimation() { 1134 void LoginDisplayHostImpl::ScheduleWorkspaceAnimation() {
1129 if (ash_util::IsRunningInMash()) { 1135 if (ash_util::IsRunningInMash()) {
1130 NOTIMPLEMENTED(); 1136 NOTIMPLEMENTED();
1131 return; 1137 return;
(...skipping 350 matching lines...) Expand 10 before | Expand all | Expand 10 after
1482 // Chrome locale. Otherwise it will be lost if Chrome restarts. 1488 // Chrome locale. Otherwise it will be lost if Chrome restarts.
1483 // Don't need to schedule pref save because setting initial local 1489 // Don't need to schedule pref save because setting initial local
1484 // will enforce preference saving. 1490 // will enforce preference saving.
1485 prefs->SetString(prefs::kApplicationLocale, locale); 1491 prefs->SetString(prefs::kApplicationLocale, locale);
1486 StartupUtils::SetInitialLocale(locale); 1492 StartupUtils::SetInitialLocale(locale);
1487 1493
1488 TriggerShowLoginWizardFinish(locale, std::move(data)); 1494 TriggerShowLoginWizardFinish(locale, std::move(data));
1489 } 1495 }
1490 1496
1491 } // namespace chromeos 1497 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698