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

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

Powered by Google App Engine
This is Rietveld 408576698