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

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

Issue 549453005: Run athena on device (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 3 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 <vector> 7 #include <vector>
8 8
9 #include "ash/audio/sounds.h" 9 #include "ash/audio/sounds.h"
10 #include "ash/desktop_background/desktop_background_controller.h" 10 #include "ash/desktop_background/desktop_background_controller.h"
(...skipping 317 matching lines...) Expand 10 before | Expand all | Expand 10 after
328 bool is_registered = StartupUtils::IsDeviceRegistered(); 328 bool is_registered = StartupUtils::IsDeviceRegistered();
329 bool zero_delay_enabled = WizardController::IsZeroDelayEnabled(); 329 bool zero_delay_enabled = WizardController::IsZeroDelayEnabled();
330 bool disable_boot_animation = CommandLine::ForCurrentProcess()->HasSwitch( 330 bool disable_boot_animation = CommandLine::ForCurrentProcess()->HasSwitch(
331 switches::kDisableBootAnimation); 331 switches::kDisableBootAnimation);
332 332
333 waiting_for_wallpaper_load_ = !zero_delay_enabled && 333 waiting_for_wallpaper_load_ = !zero_delay_enabled &&
334 (!is_registered || !disable_boot_animation); 334 (!is_registered || !disable_boot_animation);
335 335
336 #if defined(USE_ATHENA) 336 #if defined(USE_ATHENA)
337 // TODO(dpolukhin): remove #ifdef when Athena supports wallpaper manager. 337 // TODO(dpolukhin): remove #ifdef when Athena supports wallpaper manager.
338 // crbug.com/408734. 338 // crbug.com/408734
339 waiting_for_wallpaper_load_ = false; 339 waiting_for_wallpaper_load_ = false;
340 #endif 340 #endif
341 341
342 // For slower hardware we have boot animation disabled so 342 // For slower hardware we have boot animation disabled so
343 // we'll be initializing WebUI hidden, waiting for user pods to load and then 343 // we'll be initializing WebUI hidden, waiting for user pods to load and then
344 // show WebUI at once. 344 // show WebUI at once.
345 waiting_for_user_pods_ = !zero_delay_enabled && !waiting_for_wallpaper_load_; 345 waiting_for_user_pods_ = !zero_delay_enabled && !waiting_for_wallpaper_load_;
346 346
347 initialize_webui_hidden_ = 347 initialize_webui_hidden_ =
348 kHiddenWebUIInitializationDefault && !zero_delay_enabled; 348 kHiddenWebUIInitializationDefault && !zero_delay_enabled;
(...skipping 689 matching lines...) Expand 10 before | Expand all | Expand 10 after
1038 break; 1038 break;
1039 } 1039 }
1040 } 1040 }
1041 1041
1042 void LoginDisplayHostImpl::InitLoginWindowAndView() { 1042 void LoginDisplayHostImpl::InitLoginWindowAndView() {
1043 if (login_window_) 1043 if (login_window_)
1044 return; 1044 return;
1045 1045
1046 if (system::InputDeviceSettings::Get()->ForceKeyboardDrivenUINavigation()) { 1046 if (system::InputDeviceSettings::Get()->ForceKeyboardDrivenUINavigation()) {
1047 views::FocusManager::set_arrow_key_traversal_enabled(true); 1047 views::FocusManager::set_arrow_key_traversal_enabled(true);
1048 1048 #if !defined(USE_ATHENA)
1049 // crbug.com/405859
1049 focus_ring_controller_.reset(new FocusRingController); 1050 focus_ring_controller_.reset(new FocusRingController);
1050 focus_ring_controller_->SetVisible(true); 1051 focus_ring_controller_->SetVisible(true);
1052 #endif
1051 1053
1052 keyboard_driven_oobe_key_handler_.reset(new KeyboardDrivenOobeKeyHandler); 1054 keyboard_driven_oobe_key_handler_.reset(new KeyboardDrivenOobeKeyHandler);
1053 } 1055 }
1054 1056
1055 views::Widget::InitParams params( 1057 views::Widget::InitParams params(
1056 views::Widget::InitParams::TYPE_WINDOW_FRAMELESS); 1058 views::Widget::InitParams::TYPE_WINDOW_FRAMELESS);
1057 params.bounds = background_bounds(); 1059 params.bounds = background_bounds();
1058 params.show_state = ui::SHOW_STATE_FULLSCREEN; 1060 params.show_state = ui::SHOW_STATE_FULLSCREEN;
1059 params.opacity = views::Widget::InitParams::TRANSLUCENT_WINDOW; 1061 params.opacity = views::Widget::InitParams::TRANSLUCENT_WINDOW;
1060 #if defined(USE_ATHENA) 1062 #if defined(USE_ATHENA)
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
1133 EnableSystemSoundsForAccessibility(); 1135 EnableSystemSoundsForAccessibility();
1134 return; 1136 return;
1135 } 1137 }
1136 1138
1137 if (!startup_sound_honors_spoken_feedback_ && 1139 if (!startup_sound_honors_spoken_feedback_ &&
1138 !ash::PlaySystemSoundAlways(SOUND_STARTUP)) { 1140 !ash::PlaySystemSoundAlways(SOUND_STARTUP)) {
1139 EnableSystemSoundsForAccessibility(); 1141 EnableSystemSoundsForAccessibility();
1140 return; 1142 return;
1141 } 1143 }
1142 1144
1145 #if !defined(USE_ATHENA)
1146 // crbug.com/408733
1143 if (startup_sound_honors_spoken_feedback_ && 1147 if (startup_sound_honors_spoken_feedback_ &&
1144 !ash::PlaySystemSoundIfSpokenFeedback(SOUND_STARTUP)) { 1148 !ash::PlaySystemSoundIfSpokenFeedback(SOUND_STARTUP)) {
1145 EnableSystemSoundsForAccessibility(); 1149 EnableSystemSoundsForAccessibility();
1146 return; 1150 return;
1147 } 1151 }
1152 #endif
1148 1153
1149 base::MessageLoop::current()->PostDelayedTask( 1154 base::MessageLoop::current()->PostDelayedTask(
1150 FROM_HERE, 1155 FROM_HERE,
1151 base::Bind(&EnableSystemSoundsForAccessibility), 1156 base::Bind(&EnableSystemSoundsForAccessibility),
1152 media::SoundsManager::Get()->GetDuration(SOUND_STARTUP)); 1157 media::SoundsManager::Get()->GetDuration(SOUND_STARTUP));
1153 } 1158 }
1154 1159
1155 void LoginDisplayHostImpl::OnLoginPromptVisible() { 1160 void LoginDisplayHostImpl::OnLoginPromptVisible() {
1156 if (!login_prompt_visible_time_.is_null()) 1161 if (!login_prompt_visible_time_.is_null())
1157 return; 1162 return;
(...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after
1288 scoped_ptr<locale_util::SwitchLanguageCallback> callback( 1293 scoped_ptr<locale_util::SwitchLanguageCallback> callback(
1289 new locale_util::SwitchLanguageCallback( 1294 new locale_util::SwitchLanguageCallback(
1290 base::Bind(&OnLanguageSwitchedCallback, base::Passed(data.Pass())))); 1295 base::Bind(&OnLanguageSwitchedCallback, base::Passed(data.Pass()))));
1291 1296
1292 // Load locale keyboards here. Hardware layout would be automatically enabled. 1297 // Load locale keyboards here. Hardware layout would be automatically enabled.
1293 locale_util::SwitchLanguage( 1298 locale_util::SwitchLanguage(
1294 locale, true, true /* login_layouts_only */, callback.Pass()); 1299 locale, true, true /* login_layouts_only */, callback.Pass());
1295 } 1300 }
1296 1301
1297 } // namespace chromeos 1302 } // namespace chromeos
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/login/lock/screen_locker.cc ('k') | chrome/browser/chromeos/memory/oom_priority_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698