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

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

Issue 12045022: Move code in ui\webui\jstemplate_builder.* to webui namespace for consistency. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 7 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 | Annotate | Revision Log
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/mobile_setup_ui.h" 5 #include "chrome/browser/ui/webui/chromeos/mobile_setup_ui.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <map> 8 #include <map>
9 #include <string> 9 #include <string>
10 10
(...skipping 204 matching lines...) Expand 10 before | Expand all | Expand 10 after
215 strings.SetString("cancel_button", 215 strings.SetString("cancel_button",
216 l10n_util::GetStringUTF16(IDS_CANCEL)); 216 l10n_util::GetStringUTF16(IDS_CANCEL));
217 strings.SetString("ok_button", 217 strings.SetString("ok_button",
218 l10n_util::GetStringUTF16(IDS_OK)); 218 l10n_util::GetStringUTF16(IDS_OK));
219 web_ui_util::SetFontAndTextDirection(&strings); 219 web_ui_util::SetFontAndTextDirection(&strings);
220 220
221 static const base::StringPiece html( 221 static const base::StringPiece html(
222 ResourceBundle::GetSharedInstance().GetRawDataResource( 222 ResourceBundle::GetSharedInstance().GetRawDataResource(
223 IDR_MOBILE_SETUP_PAGE_HTML)); 223 IDR_MOBILE_SETUP_PAGE_HTML));
224 224
225 std::string full_html = jstemplate_builder::GetI18nTemplateHtml(html, 225 std::string full_html = webui::GetI18nTemplateHtml(html, &strings);
226 &strings);
227 226
228 callback.Run(base::RefCountedString::TakeString(&full_html)); 227 callback.Run(base::RefCountedString::TakeString(&full_html));
229 } 228 }
230 229
231 //////////////////////////////////////////////////////////////////////////////// 230 ////////////////////////////////////////////////////////////////////////////////
232 // 231 //
233 // MobileSetupHandler 232 // MobileSetupHandler
234 // 233 //
235 //////////////////////////////////////////////////////////////////////////////// 234 ////////////////////////////////////////////////////////////////////////////////
236 MobileSetupHandler::MobileSetupHandler() { 235 MobileSetupHandler::MobileSetupHandler() {
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after
344 343
345 // Set up the chrome://mobilesetup/ source. 344 // Set up the chrome://mobilesetup/ source.
346 Profile* profile = Profile::FromWebUI(web_ui); 345 Profile* profile = Profile::FromWebUI(web_ui);
347 ChromeURLDataManager::AddDataSource(profile, html_source); 346 ChromeURLDataManager::AddDataSource(profile, html_source);
348 } 347 }
349 348
350 void MobileSetupUI::RenderViewCreated(RenderViewHost* host) { 349 void MobileSetupUI::RenderViewCreated(RenderViewHost* host) {
351 // Destroyed by the corresponding RenderViewHost 350 // Destroyed by the corresponding RenderViewHost
352 new PortalFrameLoadObserver(AsWeakPtr(), host); 351 new PortalFrameLoadObserver(AsWeakPtr(), host);
353 } 352 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/webui/chromeos/login/oobe_ui.cc ('k') | chrome/browser/ui/webui/chromeos/proxy_settings_ui.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698