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

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

Issue 599653003: Remove old template html boilerplate (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@bydefault
Patch Set: fix android Created 6 years, 2 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();
82 source->SetJsonPath("strings.js"); 81 source->SetJsonPath("strings.js");
83 source->AddResourcePath("image_burner.js", IDR_IMAGEBURNER_JS); 82 source->AddResourcePath("image_burner.js", IDR_IMAGEBURNER_JS);
84 source->SetDefaultResource(IDR_IMAGEBURNER_HTML); 83 source->SetDefaultResource(IDR_IMAGEBURNER_HTML);
85 return source; 84 return source;
86 } 85 }
87 86
88 class WebUIHandler 87 class WebUIHandler
89 : public content::WebUIMessageHandler, 88 : public content::WebUIMessageHandler,
90 public BurnController::Delegate { 89 public BurnController::Delegate {
91 public: 90 public:
(...skipping 232 matching lines...) Expand 10 before | Expand all | Expand 10 after
324 323
325 ImageBurnUI::ImageBurnUI(content::WebUI* web_ui) : WebUIController(web_ui) { 324 ImageBurnUI::ImageBurnUI(content::WebUI* web_ui) : WebUIController(web_ui) {
326 chromeos::imageburner::WebUIHandler* handler = 325 chromeos::imageburner::WebUIHandler* handler =
327 new chromeos::imageburner::WebUIHandler(web_ui->GetWebContents()); 326 new chromeos::imageburner::WebUIHandler(web_ui->GetWebContents());
328 web_ui->AddMessageHandler(handler); 327 web_ui->AddMessageHandler(handler);
329 328
330 Profile* profile = Profile::FromWebUI(web_ui); 329 Profile* profile = Profile::FromWebUI(web_ui);
331 content::WebUIDataSource::Add( 330 content::WebUIDataSource::Add(
332 profile, chromeos::imageburner::CreateImageburnerUIHTMLSource()); 331 profile, chromeos::imageburner::CreateImageburnerUIHTMLSource());
333 } 332 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/webui/chromeos/first_run/first_run_ui.cc ('k') | chrome/browser/ui/webui/chromeos/keyboard_overlay_ui.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698