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

Side by Side Diff: chrome/browser/ui/webui/chromeos/sim_unlock_ui.cc

Issue 830743003: Directly inline shared WebUI CSS declarations into the security and supervised user interstitials. (Closed) Base URL: https://chromium.googlesource.com/chromium/src@master
Patch Set: review Created 5 years, 11 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 (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
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
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698