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

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

Issue 689683004: Make login code not depend on Ash when use_athena=1 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@athena_do_not_use_ash44_ui
Patch Set: Created 6 years, 1 month 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 <vector> 7 #include <vector>
8 8
9 #include "ash/audio/sounds.h"
10 #include "ash/desktop_background/desktop_background_controller.h"
11 #include "ash/desktop_background/user_wallpaper_delegate.h"
12 #include "ash/shell.h"
13 #include "ash/shell_window_ids.h"
14 #include "base/bind.h" 9 #include "base/bind.h"
15 #include "base/command_line.h" 10 #include "base/command_line.h"
16 #include "base/debug/trace_event.h" 11 #include "base/debug/trace_event.h"
17 #include "base/logging.h" 12 #include "base/logging.h"
18 #include "base/prefs/pref_service.h" 13 #include "base/prefs/pref_service.h"
19 #include "base/strings/string_split.h" 14 #include "base/strings/string_split.h"
20 #include "base/strings/utf_string_conversions.h" 15 #include "base/strings/utf_string_conversions.h"
21 #include "base/threading/thread_restrictions.h" 16 #include "base/threading/thread_restrictions.h"
22 #include "base/time/time.h" 17 #include "base/time/time.h"
23 #include "base/values.h" 18 #include "base/values.h"
(...skipping 11 matching lines...) Expand all
35 #include "chrome/browser/chromeos/kiosk_mode/kiosk_mode_settings.h" 30 #include "chrome/browser/chromeos/kiosk_mode/kiosk_mode_settings.h"
36 #include "chrome/browser/chromeos/language_preferences.h" 31 #include "chrome/browser/chromeos/language_preferences.h"
37 #include "chrome/browser/chromeos/login/demo_mode/demo_app_launcher.h" 32 #include "chrome/browser/chromeos/login/demo_mode/demo_app_launcher.h"
38 #include "chrome/browser/chromeos/login/existing_user_controller.h" 33 #include "chrome/browser/chromeos/login/existing_user_controller.h"
39 #include "chrome/browser/chromeos/login/helper.h" 34 #include "chrome/browser/chromeos/login/helper.h"
40 #include "chrome/browser/chromeos/login/login_utils.h" 35 #include "chrome/browser/chromeos/login/login_utils.h"
41 #include "chrome/browser/chromeos/login/login_wizard.h" 36 #include "chrome/browser/chromeos/login/login_wizard.h"
42 #include "chrome/browser/chromeos/login/screens/core_oobe_actor.h" 37 #include "chrome/browser/chromeos/login/screens/core_oobe_actor.h"
43 #include "chrome/browser/chromeos/login/startup_utils.h" 38 #include "chrome/browser/chromeos/login/startup_utils.h"
44 #include "chrome/browser/chromeos/login/ui/input_events_blocker.h" 39 #include "chrome/browser/chromeos/login/ui/input_events_blocker.h"
45 #include "chrome/browser/chromeos/login/ui/keyboard_driven_oobe_key_handler.h"
46 #include "chrome/browser/chromeos/login/ui/oobe_display.h" 40 #include "chrome/browser/chromeos/login/ui/oobe_display.h"
47 #include "chrome/browser/chromeos/login/ui/webui_login_display.h" 41 #include "chrome/browser/chromeos/login/ui/webui_login_display.h"
48 #include "chrome/browser/chromeos/login/ui/webui_login_view.h" 42 #include "chrome/browser/chromeos/login/ui/webui_login_view.h"
49 #include "chrome/browser/chromeos/login/wizard_controller.h" 43 #include "chrome/browser/chromeos/login/wizard_controller.h"
50 #include "chrome/browser/chromeos/mobile_config.h" 44 #include "chrome/browser/chromeos/mobile_config.h"
51 #include "chrome/browser/chromeos/net/delay_network_call.h" 45 #include "chrome/browser/chromeos/net/delay_network_call.h"
52 #include "chrome/browser/chromeos/policy/auto_enrollment_client.h" 46 #include "chrome/browser/chromeos/policy/auto_enrollment_client.h"
53 #include "chrome/browser/chromeos/policy/browser_policy_connector_chromeos.h" 47 #include "chrome/browser/chromeos/policy/browser_policy_connector_chromeos.h"
54 #include "chrome/browser/chromeos/system/input_device_settings.h" 48 #include "chrome/browser/chromeos/system/input_device_settings.h"
55 #include "chrome/browser/chromeos/ui/focus_ring_controller.h" 49 #include "chrome/browser/chromeos/ui/focus_ring_controller.h"
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
89 #include "ui/gfx/size.h" 83 #include "ui/gfx/size.h"
90 #include "ui/gfx/transform.h" 84 #include "ui/gfx/transform.h"
91 #include "ui/keyboard/keyboard_controller.h" 85 #include "ui/keyboard/keyboard_controller.h"
92 #include "ui/keyboard/keyboard_util.h" 86 #include "ui/keyboard/keyboard_util.h"
93 #include "ui/views/focus/focus_manager.h" 87 #include "ui/views/focus/focus_manager.h"
94 #include "ui/views/widget/widget.h" 88 #include "ui/views/widget/widget.h"
95 #include "ui/views/widget/widget_delegate.h" 89 #include "ui/views/widget/widget_delegate.h"
96 #include "ui/wm/core/window_animations.h" 90 #include "ui/wm/core/window_animations.h"
97 #include "url/gurl.h" 91 #include "url/gurl.h"
98 92
93 #if !defined(USE_ATHENA)
94 #include "ash/audio/sounds.h"
95 #include "ash/desktop_background/desktop_background_controller.h"
96 #include "ash/desktop_background/user_wallpaper_delegate.h"
97 #include "ash/shell.h"
98 #include "ash/shell_window_ids.h"
99 #include "chrome/browser/chromeos/login/ui/keyboard_driven_oobe_key_handler.h"
100 #endif
101
99 #if defined(USE_ATHENA) 102 #if defined(USE_ATHENA)
100 #include "athena/screen/public/screen_manager.h" 103 #include "athena/screen/public/screen_manager.h"
101 #include "athena/util/container_priorities.h" 104 #include "athena/util/container_priorities.h"
102 #include "athena/util/fill_layout_manager.h" 105 #include "athena/util/fill_layout_manager.h"
103 #endif 106 #endif
104 107
105 namespace { 108 namespace {
106 109
107 // Maximum delay for startup sound after 'loginPromptVisible' signal. 110 // Maximum delay for startup sound after 'loginPromptVisible' signal.
108 const int kStartupSoundMaxDelayMs = 2000; 111 const int kStartupSoundMaxDelayMs = 2000;
(...skipping 342 matching lines...) Expand 10 before | Expand all | Expand 10 after
451 WebUILoginView* LoginDisplayHostImpl::GetWebUILoginView() const { 454 WebUILoginView* LoginDisplayHostImpl::GetWebUILoginView() const {
452 return login_view_; 455 return login_view_;
453 } 456 }
454 457
455 void LoginDisplayHostImpl::BeforeSessionStart() { 458 void LoginDisplayHostImpl::BeforeSessionStart() {
456 session_starting_ = true; 459 session_starting_ = true;
457 } 460 }
458 461
459 void LoginDisplayHostImpl::Finalize() { 462 void LoginDisplayHostImpl::Finalize() {
460 DVLOG(1) << "Session starting"; 463 DVLOG(1) << "Session starting";
464 #if !defined(USE_ATHENA)
461 if (ash::Shell::HasInstance()) { 465 if (ash::Shell::HasInstance()) {
462 ash::Shell::GetInstance()-> 466 ash::Shell::GetInstance()->
463 desktop_background_controller()->MoveDesktopToUnlockedContainer(); 467 desktop_background_controller()->MoveDesktopToUnlockedContainer();
464 } 468 }
469 #endif
465 if (wizard_controller_.get()) 470 if (wizard_controller_.get())
466 wizard_controller_->OnSessionStart(); 471 wizard_controller_->OnSessionStart();
467 472
468 switch (finalize_animation_type_) { 473 switch (finalize_animation_type_) {
469 case ANIMATION_NONE: 474 case ANIMATION_NONE:
470 ShutdownDisplayHost(false); 475 ShutdownDisplayHost(false);
471 break; 476 break;
472 case ANIMATION_WORKSPACE: 477 case ANIMATION_WORKSPACE:
478 #if !defined(USE_ATHENA)
473 if (ash::Shell::HasInstance()) 479 if (ash::Shell::HasInstance())
474 ScheduleWorkspaceAnimation(); 480 ScheduleWorkspaceAnimation();
481 #endif
475 482
476 ShutdownDisplayHost(false); 483 ShutdownDisplayHost(false);
477 break; 484 break;
478 case ANIMATION_FADE_OUT: 485 case ANIMATION_FADE_OUT:
479 // Display host is deleted once animation is completed 486 // Display host is deleted once animation is completed
480 // since sign in screen widget has to stay alive. 487 // since sign in screen widget has to stay alive.
481 ScheduleFadeOutAnimation(); 488 ScheduleFadeOutAnimation();
482 break; 489 break;
483 } 490 }
484 } 491 }
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after
566 573
567 restore_path_ = RESTORE_ADD_USER_INTO_SESSION; 574 restore_path_ = RESTORE_ADD_USER_INTO_SESSION;
568 completion_callback_ = completion_callback; 575 completion_callback_ = completion_callback;
569 finalize_animation_type_ = ANIMATION_NONE; 576 finalize_animation_type_ = ANIMATION_NONE;
570 VLOG(1) << "Login WebUI >> user adding"; 577 VLOG(1) << "Login WebUI >> user adding";
571 if (!login_window_) 578 if (!login_window_)
572 LoadURL(GURL(kUserAddingURL)); 579 LoadURL(GURL(kUserAddingURL));
573 // We should emit this signal only at login screen (after reboot or sign out). 580 // We should emit this signal only at login screen (after reboot or sign out).
574 login_view_->set_should_emit_login_prompt_visible(false); 581 login_view_->set_should_emit_login_prompt_visible(false);
575 582
583 #if !defined(USE_ATHENA)
576 // Lock container can be transparent after lock screen animation. 584 // Lock container can be transparent after lock screen animation.
577 aura::Window* lock_container = ash::Shell::GetContainer( 585 aura::Window* lock_container = ash::Shell::GetContainer(
578 ash::Shell::GetPrimaryRootWindow(), 586 ash::Shell::GetPrimaryRootWindow(),
579 ash::kShellWindowId_LockScreenContainersContainer); 587 ash::kShellWindowId_LockScreenContainersContainer);
580 lock_container->layer()->SetOpacity(1.0); 588 lock_container->layer()->SetOpacity(1.0);
581 589
582 ash::Shell::GetInstance()-> 590 ash::Shell::GetInstance()->
583 desktop_background_controller()->MoveDesktopToLockedContainer(); 591 desktop_background_controller()->MoveDesktopToLockedContainer();
592 #endif
584 593
585 sign_in_controller_.reset(); // Only one controller in a time. 594 sign_in_controller_.reset(); // Only one controller in a time.
586 sign_in_controller_.reset(new chromeos::ExistingUserController(this)); 595 sign_in_controller_.reset(new chromeos::ExistingUserController(this));
587 SetOobeProgressBarVisible(oobe_progress_bar_visible_ = false); 596 SetOobeProgressBarVisible(oobe_progress_bar_visible_ = false);
588 SetStatusAreaVisible(true); 597 SetStatusAreaVisible(true);
589 sign_in_controller_->Init( 598 sign_in_controller_->Init(
590 user_manager::UserManager::Get()->GetUsersAllowedForMultiProfile()); 599 user_manager::UserManager::Get()->GetUsersAllowedForMultiProfile());
591 CHECK(webui_login_display_); 600 CHECK(webui_login_display_);
592 GetOobeUI()->ShowSigninScreen(LoginScreenContext(), 601 GetOobeUI()->ShowSigninScreen(LoginScreenContext(),
593 webui_login_display_, 602 webui_login_display_,
(...skipping 247 matching lines...) Expand 10 before | Expand all | Expand 10 after
841 } 850 }
842 851
843 //////////////////////////////////////////////////////////////////////////////// 852 ////////////////////////////////////////////////////////////////////////////////
844 // LoginDisplayHostImpl, chromeos::CrasAudioHandler::AudioObserver 853 // LoginDisplayHostImpl, chromeos::CrasAudioHandler::AudioObserver
845 // implementation: 854 // implementation:
846 855
847 void LoginDisplayHostImpl::OnActiveOutputNodeChanged() { 856 void LoginDisplayHostImpl::OnActiveOutputNodeChanged() {
848 TryToPlayStartupSound(); 857 TryToPlayStartupSound();
849 } 858 }
850 859
860 #if !defined(USE_ATHENA)
851 //////////////////////////////////////////////////////////////////////////////// 861 ////////////////////////////////////////////////////////////////////////////////
852 // LoginDisplayHostImpl, ash::KeyboardStateObserver: 862 // LoginDisplayHostImpl, ash::KeyboardStateObserver:
853 // implementation: 863 // implementation:
854 864
855 void LoginDisplayHostImpl::OnVirtualKeyboardStateChanged(bool activated) { 865 void LoginDisplayHostImpl::OnVirtualKeyboardStateChanged(bool activated) {
856 if (keyboard::KeyboardController::GetInstance()) { 866 if (keyboard::KeyboardController::GetInstance()) {
857 if (activated) { 867 if (activated) {
858 if (!is_observing_keyboard_) { 868 if (!is_observing_keyboard_) {
859 keyboard::KeyboardController::GetInstance()->AddObserver(this); 869 keyboard::KeyboardController::GetInstance()->AddObserver(this);
860 is_observing_keyboard_ = true; 870 is_observing_keyboard_ = true;
861 } 871 }
862 } else { 872 } else {
863 keyboard::KeyboardController::GetInstance()->RemoveObserver(this); 873 keyboard::KeyboardController::GetInstance()->RemoveObserver(this);
864 is_observing_keyboard_ = false; 874 is_observing_keyboard_ = false;
865 } 875 }
866 } 876 }
867 } 877 }
878 #endif
868 879
869 //////////////////////////////////////////////////////////////////////////////// 880 ////////////////////////////////////////////////////////////////////////////////
870 // LoginDisplayHostImpl, keyboard::KeyboardControllerObserver: 881 // LoginDisplayHostImpl, keyboard::KeyboardControllerObserver:
871 // implementation: 882 // implementation:
872 883
873 void LoginDisplayHostImpl::OnKeyboardBoundsChanging( 884 void LoginDisplayHostImpl::OnKeyboardBoundsChanging(
874 const gfx::Rect& new_bounds) { 885 const gfx::Rect& new_bounds) {
875 if (new_bounds.IsEmpty() && !keyboard_bounds_.IsEmpty()) { 886 if (new_bounds.IsEmpty() && !keyboard_bounds_.IsEmpty()) {
876 // Keyboard has been hidden. 887 // Keyboard has been hidden.
877 if (GetOobeUI()) { 888 if (GetOobeUI()) {
(...skipping 17 matching lines...) Expand all
895 // LoginDisplayHostImpl, gfx::DisplayObserver implementation: 906 // LoginDisplayHostImpl, gfx::DisplayObserver implementation:
896 907
897 void LoginDisplayHostImpl::OnDisplayAdded(const gfx::Display& new_display) { 908 void LoginDisplayHostImpl::OnDisplayAdded(const gfx::Display& new_display) {
898 } 909 }
899 910
900 void LoginDisplayHostImpl::OnDisplayRemoved(const gfx::Display& old_display) { 911 void LoginDisplayHostImpl::OnDisplayRemoved(const gfx::Display& old_display) {
901 } 912 }
902 913
903 void LoginDisplayHostImpl::OnDisplayMetricsChanged(const gfx::Display& display, 914 void LoginDisplayHostImpl::OnDisplayMetricsChanged(const gfx::Display& display,
904 uint32_t changed_metrics) { 915 uint32_t changed_metrics) {
916 #if !defined(USE_ATHENA)
905 if (display.id() != ash::Shell::GetScreen()->GetPrimaryDisplay().id() || 917 if (display.id() != ash::Shell::GetScreen()->GetPrimaryDisplay().id() ||
906 !(changed_metrics & DISPLAY_METRIC_BOUNDS)) { 918 !(changed_metrics & DISPLAY_METRIC_BOUNDS)) {
907 return; 919 return;
908 } 920 }
909 921
910 if (GetOobeUI()) { 922 if (GetOobeUI()) {
911 const gfx::Size& size = ash::Shell::GetScreen()->GetPrimaryDisplay().size(); 923 const gfx::Size& size = ash::Shell::GetScreen()->GetPrimaryDisplay().size();
912 GetOobeUI()->GetCoreOobeActor()->SetClientAreaSize(size.width(), 924 GetOobeUI()->GetCoreOobeActor()->SetClientAreaSize(size.width(),
913 size.height()); 925 size.height());
914 } 926 }
927 #endif
915 } 928 }
916 929
917 //////////////////////////////////////////////////////////////////////////////// 930 ////////////////////////////////////////////////////////////////////////////////
918 // LoginDisplayHostImpl, views::WidgetRemovalsObserver implementation: 931 // LoginDisplayHostImpl, views::WidgetRemovalsObserver implementation:
919 void LoginDisplayHostImpl::OnWillRemoveView(views::Widget* widget, 932 void LoginDisplayHostImpl::OnWillRemoveView(views::Widget* widget,
920 views::View* view) { 933 views::View* view) {
921 if (view != static_cast<views::View*>(login_view_)) 934 if (view != static_cast<views::View*>(login_view_))
922 return; 935 return;
923 login_view_ = NULL; 936 login_view_ = NULL;
924 widget->RemoveRemovalsObserver(this); 937 widget->RemoveRemovalsObserver(this);
(...skipping 10 matching lines...) Expand all
935 registrar_.RemoveAll(); 948 registrar_.RemoveAll();
936 base::MessageLoop::current()->DeleteSoon(FROM_HERE, this); 949 base::MessageLoop::current()->DeleteSoon(FROM_HERE, this);
937 if (post_quit_task) 950 if (post_quit_task)
938 base::MessageLoop::current()->Quit(); 951 base::MessageLoop::current()->Quit();
939 952
940 if (!completion_callback_.is_null()) 953 if (!completion_callback_.is_null())
941 completion_callback_.Run(); 954 completion_callback_.Run();
942 } 955 }
943 956
944 void LoginDisplayHostImpl::ScheduleWorkspaceAnimation() { 957 void LoginDisplayHostImpl::ScheduleWorkspaceAnimation() {
958 #if !defined(USE_ATHENA)
945 if (ash::Shell::GetContainer(ash::Shell::GetPrimaryRootWindow(), 959 if (ash::Shell::GetContainer(ash::Shell::GetPrimaryRootWindow(),
946 ash::kShellWindowId_DesktopBackgroundContainer) 960 ash::kShellWindowId_DesktopBackgroundContainer)
947 ->children() 961 ->children()
948 .empty()) { 962 .empty()) {
949 // If there is no background window, don't perform any animation on the 963 // If there is no background window, don't perform any animation on the
950 // default and background layer because there is nothing behind it. 964 // default and background layer because there is nothing behind it.
951 return; 965 return;
952 } 966 }
953 967
954 if (!CommandLine::ForCurrentProcess()->HasSwitch( 968 if (!CommandLine::ForCurrentProcess()->HasSwitch(
955 switches::kDisableLoginAnimations)) 969 switches::kDisableLoginAnimations))
956 ash::Shell::GetInstance()->DoInitialWorkspaceAnimation(); 970 ash::Shell::GetInstance()->DoInitialWorkspaceAnimation();
971 #endif
957 } 972 }
958 973
959 void LoginDisplayHostImpl::ScheduleFadeOutAnimation() { 974 void LoginDisplayHostImpl::ScheduleFadeOutAnimation() {
960 ui::Layer* layer = login_window_->GetLayer(); 975 ui::Layer* layer = login_window_->GetLayer();
961 ui::ScopedLayerAnimationSettings animation(layer->GetAnimator()); 976 ui::ScopedLayerAnimationSettings animation(layer->GetAnimator());
962 animation.AddObserver(new AnimationObserver( 977 animation.AddObserver(new AnimationObserver(
963 base::Bind(&LoginDisplayHostImpl::ShutdownDisplayHost, 978 base::Bind(&LoginDisplayHostImpl::ShutdownDisplayHost,
964 animation_weak_ptr_factory_.GetWeakPtr(), 979 animation_weak_ptr_factory_.GetWeakPtr(),
965 false))); 980 false)));
966 layer->SetOpacity(0); 981 layer->SetOpacity(0);
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
1046 void LoginDisplayHostImpl::InitLoginWindowAndView() { 1061 void LoginDisplayHostImpl::InitLoginWindowAndView() {
1047 if (login_window_) 1062 if (login_window_)
1048 return; 1063 return;
1049 1064
1050 if (system::InputDeviceSettings::Get()->ForceKeyboardDrivenUINavigation()) { 1065 if (system::InputDeviceSettings::Get()->ForceKeyboardDrivenUINavigation()) {
1051 views::FocusManager::set_arrow_key_traversal_enabled(true); 1066 views::FocusManager::set_arrow_key_traversal_enabled(true);
1052 #if !defined(USE_ATHENA) 1067 #if !defined(USE_ATHENA)
1053 // crbug.com/405859 1068 // crbug.com/405859
1054 focus_ring_controller_.reset(new FocusRingController); 1069 focus_ring_controller_.reset(new FocusRingController);
1055 focus_ring_controller_->SetVisible(true); 1070 focus_ring_controller_->SetVisible(true);
1056 #endif
1057 1071
1058 keyboard_driven_oobe_key_handler_.reset(new KeyboardDrivenOobeKeyHandler); 1072 keyboard_driven_oobe_key_handler_.reset(new KeyboardDrivenOobeKeyHandler);
1073 #endif
1059 } 1074 }
1060 1075
1061 views::Widget::InitParams params( 1076 views::Widget::InitParams params(
1062 views::Widget::InitParams::TYPE_WINDOW_FRAMELESS); 1077 views::Widget::InitParams::TYPE_WINDOW_FRAMELESS);
1063 params.bounds = background_bounds(); 1078 params.bounds = background_bounds();
1064 params.show_state = ui::SHOW_STATE_FULLSCREEN; 1079 params.show_state = ui::SHOW_STATE_FULLSCREEN;
1065 params.opacity = views::Widget::InitParams::TRANSLUCENT_WINDOW; 1080 params.opacity = views::Widget::InitParams::TRANSLUCENT_WINDOW;
1066 #if defined(USE_ATHENA) 1081 #if defined(USE_ATHENA)
1067 athena::ScreenManager::ContainerParams container_params( 1082 athena::ScreenManager::ContainerParams container_params(
1068 "LoginScreen", athena::CP_LOGIN_SCREEN); 1083 "LoginScreen", athena::CP_LOGIN_SCREEN);
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
1138 startup_sound_played_ = true; 1153 startup_sound_played_ = true;
1139 1154
1140 // Don't try play startup sound if login prompt is already visible 1155 // Don't try play startup sound if login prompt is already visible
1141 // for a long time or can't be played. 1156 // for a long time or can't be played.
1142 if (base::TimeTicks::Now() - login_prompt_visible_time_ > 1157 if (base::TimeTicks::Now() - login_prompt_visible_time_ >
1143 base::TimeDelta::FromMilliseconds(kStartupSoundMaxDelayMs)) { 1158 base::TimeDelta::FromMilliseconds(kStartupSoundMaxDelayMs)) {
1144 EnableSystemSoundsForAccessibility(); 1159 EnableSystemSoundsForAccessibility();
1145 return; 1160 return;
1146 } 1161 }
1147 1162
1163 #if !defined(USE_ATHENA)
1148 if (!startup_sound_honors_spoken_feedback_ && 1164 if (!startup_sound_honors_spoken_feedback_ &&
1149 !ash::PlaySystemSoundAlways(SOUND_STARTUP)) { 1165 !ash::PlaySystemSoundAlways(SOUND_STARTUP)) {
1150 EnableSystemSoundsForAccessibility(); 1166 EnableSystemSoundsForAccessibility();
1151 return; 1167 return;
1152 } 1168 }
1153 1169
1154 #if !defined(USE_ATHENA)
1155 // crbug.com/408733 1170 // crbug.com/408733
1156 if (startup_sound_honors_spoken_feedback_ && 1171 if (startup_sound_honors_spoken_feedback_ &&
1157 !ash::PlaySystemSoundIfSpokenFeedback(SOUND_STARTUP)) { 1172 !ash::PlaySystemSoundIfSpokenFeedback(SOUND_STARTUP)) {
1158 EnableSystemSoundsForAccessibility(); 1173 EnableSystemSoundsForAccessibility();
1159 return; 1174 return;
1160 } 1175 }
1161 #endif 1176 #endif
1162 1177
1163 base::MessageLoop::current()->PostDelayedTask( 1178 base::MessageLoop::current()->PostDelayedTask(
1164 FROM_HERE, 1179 FROM_HERE,
(...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after
1302 scoped_ptr<locale_util::SwitchLanguageCallback> callback( 1317 scoped_ptr<locale_util::SwitchLanguageCallback> callback(
1303 new locale_util::SwitchLanguageCallback( 1318 new locale_util::SwitchLanguageCallback(
1304 base::Bind(&OnLanguageSwitchedCallback, base::Passed(data.Pass())))); 1319 base::Bind(&OnLanguageSwitchedCallback, base::Passed(data.Pass()))));
1305 1320
1306 // Load locale keyboards here. Hardware layout would be automatically enabled. 1321 // Load locale keyboards here. Hardware layout would be automatically enabled.
1307 locale_util::SwitchLanguage( 1322 locale_util::SwitchLanguage(
1308 locale, true, true /* login_layouts_only */, callback.Pass()); 1323 locale, true, true /* login_layouts_only */, callback.Pass());
1309 } 1324 }
1310 1325
1311 } // namespace chromeos 1326 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698