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

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

Issue 586953002: get rid of almost all old fashioned i18nTemplates (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: window dot Created 6 years, 3 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/imageburner/imageburner_ui.h" 5 #include "chrome/browser/ui/webui/chromeos/imageburner/imageburner_ui.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/files/file_path.h" 8 #include "base/files/file_path.h"
9 #include "base/i18n/rtl.h" 9 #include "base/i18n/rtl.h"
10 #include "base/strings/string16.h" 10 #include "base/strings/string16.h"
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
71 source->AddLocalizedString("statusBurn", IDS_IMAGEBURN_BURN_STATUS); 71 source->AddLocalizedString("statusBurn", IDS_IMAGEBURN_BURN_STATUS);
72 source->AddLocalizedString("statusError", IDS_IMAGEBURN_ERROR_STATUS); 72 source->AddLocalizedString("statusError", IDS_IMAGEBURN_ERROR_STATUS);
73 source->AddLocalizedString("statusSuccess", IDS_IMAGEBURN_SUCCESS_STATUS); 73 source->AddLocalizedString("statusSuccess", IDS_IMAGEBURN_SUCCESS_STATUS);
74 source->AddLocalizedString("warningSuccess", IDS_IMAGEBURN_SUCCESS_DESC); 74 source->AddLocalizedString("warningSuccess", IDS_IMAGEBURN_SUCCESS_DESC);
75 source->AddLocalizedString("title", IDS_IMAGEBURN_PAGE_TITLE); 75 source->AddLocalizedString("title", IDS_IMAGEBURN_PAGE_TITLE);
76 source->AddLocalizedString("confirmButton", IDS_IMAGEBURN_CONFIRM_BUTTON); 76 source->AddLocalizedString("confirmButton", IDS_IMAGEBURN_CONFIRM_BUTTON);
77 source->AddLocalizedString("cancelButton", IDS_IMAGEBURN_CANCEL_BUTTON); 77 source->AddLocalizedString("cancelButton", IDS_IMAGEBURN_CANCEL_BUTTON);
78 source->AddLocalizedString("retryButton", IDS_IMAGEBURN_RETRY_BUTTON); 78 source->AddLocalizedString("retryButton", IDS_IMAGEBURN_RETRY_BUTTON);
79 source->AddString("moreInfoLink", base::ASCIIToUTF16(kMoreInfoLink)); 79 source->AddString("moreInfoLink", base::ASCIIToUTF16(kMoreInfoLink));
80 80
81 source->SetUseJsonJSFormatV2();
81 source->SetJsonPath("strings.js"); 82 source->SetJsonPath("strings.js");
82 source->AddResourcePath("image_burner.js", IDR_IMAGEBURNER_JS); 83 source->AddResourcePath("image_burner.js", IDR_IMAGEBURNER_JS);
83 source->SetDefaultResource(IDR_IMAGEBURNER_HTML); 84 source->SetDefaultResource(IDR_IMAGEBURNER_HTML);
84 return source; 85 return source;
85 } 86 }
86 87
87 class WebUIHandler 88 class WebUIHandler
88 : public content::WebUIMessageHandler, 89 : public content::WebUIMessageHandler,
89 public BurnController::Delegate { 90 public BurnController::Delegate {
90 public: 91 public:
(...skipping 232 matching lines...) Expand 10 before | Expand all | Expand 10 after
323 324
324 ImageBurnUI::ImageBurnUI(content::WebUI* web_ui) : WebUIController(web_ui) { 325 ImageBurnUI::ImageBurnUI(content::WebUI* web_ui) : WebUIController(web_ui) {
325 chromeos::imageburner::WebUIHandler* handler = 326 chromeos::imageburner::WebUIHandler* handler =
326 new chromeos::imageburner::WebUIHandler(web_ui->GetWebContents()); 327 new chromeos::imageburner::WebUIHandler(web_ui->GetWebContents());
327 web_ui->AddMessageHandler(handler); 328 web_ui->AddMessageHandler(handler);
328 329
329 Profile* profile = Profile::FromWebUI(web_ui); 330 Profile* profile = Profile::FromWebUI(web_ui);
330 content::WebUIDataSource::Add( 331 content::WebUIDataSource::Add(
331 profile, chromeos::imageburner::CreateImageburnerUIHTMLSource()); 332 profile, chromeos::imageburner::CreateImageburnerUIHTMLSource());
332 } 333 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698