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/sim_unlock_ui.h" | 5 #include "chrome/browser/ui/webui/chromeos/sim_unlock_ui.h" |
6 | 6 |
7 #include <string> | 7 #include <string> |
8 | 8 |
9 #include "base/basictypes.h" | 9 #include "base/basictypes.h" |
10 #include "base/bind.h" | 10 #include "base/bind.h" |
(...skipping 306 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
317 strings.SetString("simDisabledMessage", | 317 strings.SetString("simDisabledMessage", |
318 l10n_util::GetStringUTF16(IDS_SIM_UNLOCK_SIM_DISABLED_MESSAGE)); | 318 l10n_util::GetStringUTF16(IDS_SIM_UNLOCK_SIM_DISABLED_MESSAGE)); |
319 | 319 |
320 strings.SetString("changePinTitle", l10n_util::GetStringUTF16( | 320 strings.SetString("changePinTitle", l10n_util::GetStringUTF16( |
321 IDS_OPTIONS_SETTINGS_INTERNET_CELLULAR_CHANGE_PIN_TITLE)); | 321 IDS_OPTIONS_SETTINGS_INTERNET_CELLULAR_CHANGE_PIN_TITLE)); |
322 strings.SetString("changePinMessage", l10n_util::GetStringUTF16( | 322 strings.SetString("changePinMessage", l10n_util::GetStringUTF16( |
323 IDS_OPTIONS_SETTINGS_INTERNET_CELLULAR_CHANGE_PIN_MESSAGE)); | 323 IDS_OPTIONS_SETTINGS_INTERNET_CELLULAR_CHANGE_PIN_MESSAGE)); |
324 strings.SetString("oldPin", l10n_util::GetStringUTF16( | 324 strings.SetString("oldPin", l10n_util::GetStringUTF16( |
325 IDS_OPTIONS_SETTINGS_INTERNET_CELLULAR_CHANGE_PIN_OLD_PIN)); | 325 IDS_OPTIONS_SETTINGS_INTERNET_CELLULAR_CHANGE_PIN_OLD_PIN)); |
326 | 326 |
327 webui::SetFontAndTextDirection(&strings); | 327 webui::SetTextDirection(&strings); |
328 | 328 |
329 static const base::StringPiece html( | 329 static const base::StringPiece html( |
330 ResourceBundle::GetSharedInstance().GetRawDataResource( | 330 ResourceBundle::GetSharedInstance().GetRawDataResource( |
331 IDR_SIM_UNLOCK_HTML)); | 331 IDR_SIM_UNLOCK_HTML)); |
332 | 332 |
333 std::string full_html = webui::GetI18nTemplateHtml(html, &strings); | 333 std::string full_html = webui::GetI18nTemplateHtml(html, &strings); |
334 callback.Run(base::RefCountedString::TakeString(&full_html)); | 334 callback.Run(base::RefCountedString::TakeString(&full_html)); |
335 } | 335 } |
336 | 336 |
337 // SimUnlockHandler ------------------------------------------------------------ | 337 // SimUnlockHandler ------------------------------------------------------------ |
(...skipping 421 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
759 SimUnlockHandler* handler = new SimUnlockHandler(); | 759 SimUnlockHandler* handler = new SimUnlockHandler(); |
760 web_ui->AddMessageHandler(handler); | 760 web_ui->AddMessageHandler(handler); |
761 SimUnlockUIHTMLSource* html_source = new SimUnlockUIHTMLSource(); | 761 SimUnlockUIHTMLSource* html_source = new SimUnlockUIHTMLSource(); |
762 | 762 |
763 // Set up the chrome://sim-unlock/ source. | 763 // Set up the chrome://sim-unlock/ source. |
764 Profile* profile = Profile::FromWebUI(web_ui); | 764 Profile* profile = Profile::FromWebUI(web_ui); |
765 content::URLDataSource::Add(profile, html_source); | 765 content::URLDataSource::Add(profile, html_source); |
766 } | 766 } |
767 | 767 |
768 } // namespace chromeos | 768 } // namespace chromeos |
OLD | NEW |