| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/logging.h" | 9 #include "base/logging.h" |
| 10 #include "base/values.h" | 10 #include "base/values.h" |
| (...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 111 : oobe_ui_(oobe_ui) { | 111 : oobe_ui_(oobe_ui) { |
| 112 } | 112 } |
| 113 | 113 |
| 114 CoreOobeHandler::~CoreOobeHandler() { | 114 CoreOobeHandler::~CoreOobeHandler() { |
| 115 } | 115 } |
| 116 | 116 |
| 117 void CoreOobeHandler::GetLocalizedSettings(DictionaryValue* localized_strings) { | 117 void CoreOobeHandler::GetLocalizedSettings(DictionaryValue* localized_strings) { |
| 118 // OOBE title is not actually seen in UI, use title of the welcome screen. | 118 // OOBE title is not actually seen in UI, use title of the welcome screen. |
| 119 // TODO(altimofeev): move the strings to the corresponding handlers, when | 119 // TODO(altimofeev): move the strings to the corresponding handlers, when |
| 120 // they will be ready. | 120 // they will be ready. |
| 121 // OOBE title is not actually seen in UI, use title of the welcome screen. |
| 122 localized_strings->SetString("productName", |
| 123 l10n_util::GetStringUTF16(IDS_SHORT_PRODUCT_NAME)); |
| 121 localized_strings->SetString("title", | 124 localized_strings->SetString("title", |
| 122 l10n_util::GetStringUTF16(IDS_NETWORK_SELECTION_TITLE)); | 125 l10n_util::GetStringUTF16(IDS_NETWORK_SELECTION_TITLE)); |
| 123 localized_strings->SetString("welcomeScreenTitle", | 126 localized_strings->SetString("welcomeScreenTitle", |
| 124 l10n_util::GetStringFUTF16(IDS_WELCOME_SCREEN_TITLE, | 127 l10n_util::GetStringUTF16(IDS_WELCOME_SCREEN_TITLE)); |
| 125 l10n_util::GetStringUTF16(IDS_SHORT_PRODUCT_NAME))); | |
| 126 localized_strings->SetString("languageSelect", | 128 localized_strings->SetString("languageSelect", |
| 127 l10n_util::GetStringUTF16(IDS_LANGUAGE_SELECTION_SELECT)); | 129 l10n_util::GetStringUTF16(IDS_LANGUAGE_SELECTION_SELECT)); |
| 128 localized_strings->SetString("keyboardSelect", | 130 localized_strings->SetString("keyboardSelect", |
| 129 l10n_util::GetStringUTF16(IDS_KEYBOARD_SELECTION_SELECT)); | 131 l10n_util::GetStringUTF16(IDS_KEYBOARD_SELECTION_SELECT)); |
| 130 localized_strings->SetString("networkSelect", | 132 localized_strings->SetString("networkSelect", |
| 131 l10n_util::GetStringUTF16(IDS_NETWORK_SELECTION_SELECT)); | 133 l10n_util::GetStringUTF16(IDS_NETWORK_SELECTION_SELECT)); |
| 132 localized_strings->SetString("continue", | 134 localized_strings->SetString("continue", |
| 133 l10n_util::GetStringUTF16(IDS_NETWORK_SELECTION_CONTINUE_BUTTON)); | 135 l10n_util::GetStringUTF16(IDS_NETWORK_SELECTION_CONTINUE_BUTTON)); |
| 136 localized_strings->SetString("updateScreenTitle", |
| 137 l10n_util::GetStringUTF16(IDS_UPDATE_SCREEN_TITLE)); |
| 138 localized_strings->SetString("installingUpdate", |
| 139 l10n_util::GetStringFUTF16(IDS_INSTALLING_UPDATE, |
| 140 l10n_util::GetStringUTF16(IDS_SHORT_PRODUCT_NAME))); |
| 141 localized_strings->SetString("installingUpdateDesc", |
| 142 l10n_util::GetStringUTF16(IDS_INSTALLING_UPDATE_DESC)); |
| 134 } | 143 } |
| 135 | 144 |
| 136 void CoreOobeHandler::Initialize() { | 145 void CoreOobeHandler::Initialize() { |
| 137 } | 146 } |
| 138 | 147 |
| 139 void CoreOobeHandler::RegisterMessages() { | 148 void CoreOobeHandler::RegisterMessages() { |
| 140 web_ui_->RegisterMessageCallback(kJsApiScreenStateInitialize, | 149 web_ui_->RegisterMessageCallback(kJsApiScreenStateInitialize, |
| 141 NewCallback(this, &CoreOobeHandler::OnInitialized)); | 150 NewCallback(this, &CoreOobeHandler::OnInitialized)); |
| 142 } | 151 } |
| 143 | 152 |
| (...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 214 | 223 |
| 215 void OobeUI::InitializeHandlers() { | 224 void OobeUI::InitializeHandlers() { |
| 216 std::vector<WebUIMessageHandler*>::iterator iter; | 225 std::vector<WebUIMessageHandler*>::iterator iter; |
| 217 // Note, handlers_[0] is a GenericHandler used by the WebUI. | 226 // Note, handlers_[0] is a GenericHandler used by the WebUI. |
| 218 for (iter = handlers_.begin() + 1; iter != handlers_.end(); ++iter) { | 227 for (iter = handlers_.begin() + 1; iter != handlers_.end(); ++iter) { |
| 219 (static_cast<OobeMessageHandler*>(*iter))->Initialize(); | 228 (static_cast<OobeMessageHandler*>(*iter))->Initialize(); |
| 220 } | 229 } |
| 221 } | 230 } |
| 222 | 231 |
| 223 } // namespace chromeos | 232 } // namespace chromeos |
| OLD | NEW |