| OLD | NEW |
| 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 "chrome/browser/ui/webui/chromeos/login/oobe_ui.h" | 5 #include "chrome/browser/ui/webui/chromeos/login/oobe_ui.h" |
| 6 | 6 |
| 7 #include <string> | 7 #include <string> |
| 8 | 8 |
| 9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
| 10 #include "base/logging.h" | 10 #include "base/logging.h" |
| (...skipping 225 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 236 // Note, handlers_[0] is a GenericHandler used by the WebUI. | 236 // Note, handlers_[0] is a GenericHandler used by the WebUI. |
| 237 for (size_t i = 0; i < handlers_.size(); ++i) | 237 for (size_t i = 0; i < handlers_.size(); ++i) |
| 238 handlers_[i]->GetLocalizedStrings(localized_strings); | 238 handlers_[i]->GetLocalizedStrings(localized_strings); |
| 239 ChromeURLDataManager::DataSource::SetFontAndTextDirection(localized_strings); | 239 ChromeURLDataManager::DataSource::SetFontAndTextDirection(localized_strings); |
| 240 | 240 |
| 241 if (!CommandLine::ForCurrentProcess()->HasSwitch(switches::kDisableNewOobe)) | 241 if (!CommandLine::ForCurrentProcess()->HasSwitch(switches::kDisableNewOobe)) |
| 242 localized_strings->SetString("oobeType", "new"); | 242 localized_strings->SetString("oobeType", "new"); |
| 243 else | 243 else |
| 244 localized_strings->SetString("oobeType", "old"); | 244 localized_strings->SetString("oobeType", "old"); |
| 245 | 245 |
| 246 // If we're not doing boot animation then WebUI should trigger |
| 247 // wallpaper load on boot. |
| 248 if (CommandLine::ForCurrentProcess()->HasSwitch( |
| 249 switches::kDisableBootAnimation)) { |
| 250 localized_strings->SetString("bootIntoWallpaper", "on"); |
| 251 } else { |
| 252 localized_strings->SetString("bootIntoWallpaper", "off"); |
| 253 } |
| 254 |
| 246 // OobeUI is used for OOBE/login and lock screen. | 255 // OobeUI is used for OOBE/login and lock screen. |
| 247 if (BaseLoginDisplayHost::default_host()) | 256 if (BaseLoginDisplayHost::default_host()) |
| 248 localized_strings->SetString("screenType", "login"); | 257 localized_strings->SetString("screenType", "login"); |
| 249 else | 258 else |
| 250 localized_strings->SetString("screenType", "lock"); | 259 localized_strings->SetString("screenType", "lock"); |
| 251 } | 260 } |
| 252 | 261 |
| 253 void OobeUI::AddScreenHandler(BaseScreenHandler* handler) { | 262 void OobeUI::AddScreenHandler(BaseScreenHandler* handler) { |
| 254 web_ui()->AddMessageHandler(handler); | 263 web_ui()->AddMessageHandler(handler); |
| 255 handlers_.push_back(handler); | 264 handlers_.push_back(handler); |
| (...skipping 15 matching lines...) Expand all Loading... |
| 271 | 280 |
| 272 void OobeUI::ResetSigninScreenHandlerDelegate() { | 281 void OobeUI::ResetSigninScreenHandlerDelegate() { |
| 273 signin_screen_handler_->SetDelegate(NULL); | 282 signin_screen_handler_->SetDelegate(NULL); |
| 274 } | 283 } |
| 275 | 284 |
| 276 void OobeUI::OnLoginPromptVisible() { | 285 void OobeUI::OnLoginPromptVisible() { |
| 277 user_image_screen_actor_->CheckCameraPresence(); | 286 user_image_screen_actor_->CheckCameraPresence(); |
| 278 } | 287 } |
| 279 | 288 |
| 280 } // namespace chromeos | 289 } // namespace chromeos |
| OLD | NEW |