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

Side by Side Diff: chrome/browser/ui/webui/nacl_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/nacl_ui.h" 5 #include "chrome/browser/ui/webui/nacl_ui.h"
6 6
7 #include <string> 7 #include <string>
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
46 using content::BrowserThread; 46 using content::BrowserThread;
47 using content::PluginService; 47 using content::PluginService;
48 using content::WebUIMessageHandler; 48 using content::WebUIMessageHandler;
49 49
50 namespace { 50 namespace {
51 51
52 content::WebUIDataSource* CreateNaClUIHTMLSource() { 52 content::WebUIDataSource* CreateNaClUIHTMLSource() {
53 content::WebUIDataSource* source = 53 content::WebUIDataSource* source =
54 content::WebUIDataSource::Create(chrome::kChromeUINaClHost); 54 content::WebUIDataSource::Create(chrome::kChromeUINaClHost);
55 55
56 source->SetUseJsonJSFormatV2();
57 source->AddLocalizedString("loadingMessage", IDS_NACL_LOADING_MESSAGE); 56 source->AddLocalizedString("loadingMessage", IDS_NACL_LOADING_MESSAGE);
58 source->AddLocalizedString("naclLongTitle", IDS_NACL_TITLE_MESSAGE); 57 source->AddLocalizedString("naclLongTitle", IDS_NACL_TITLE_MESSAGE);
59 source->SetJsonPath("strings.js"); 58 source->SetJsonPath("strings.js");
60 source->AddResourcePath("about_nacl.css", IDR_ABOUT_NACL_CSS); 59 source->AddResourcePath("about_nacl.css", IDR_ABOUT_NACL_CSS);
61 source->AddResourcePath("about_nacl.js", IDR_ABOUT_NACL_JS); 60 source->AddResourcePath("about_nacl.js", IDR_ABOUT_NACL_JS);
62 source->SetDefaultResource(IDR_ABOUT_NACL_HTML); 61 source->SetDefaultResource(IDR_ABOUT_NACL_HTML);
63 return source; 62 return source;
64 } 63 }
65 64
66 //////////////////////////////////////////////////////////////////////////////// 65 ////////////////////////////////////////////////////////////////////////////////
(...skipping 316 matching lines...) Expand 10 before | Expand all | Expand 10 after
383 382
384 NaClUI::NaClUI(content::WebUI* web_ui) : WebUIController(web_ui) { 383 NaClUI::NaClUI(content::WebUI* web_ui) : WebUIController(web_ui) {
385 content::RecordAction(UserMetricsAction("ViewAboutNaCl")); 384 content::RecordAction(UserMetricsAction("ViewAboutNaCl"));
386 385
387 web_ui->AddMessageHandler(new NaClDomHandler()); 386 web_ui->AddMessageHandler(new NaClDomHandler());
388 387
389 // Set up the about:nacl source. 388 // Set up the about:nacl source.
390 Profile* profile = Profile::FromWebUI(web_ui); 389 Profile* profile = Profile::FromWebUI(web_ui);
391 content::WebUIDataSource::Add(profile, CreateNaClUIHTMLSource()); 390 content::WebUIDataSource::Add(profile, CreateNaClUIHTMLSource());
392 } 391 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/webui/media/webrtc_logs_ui.cc ('k') | chrome/browser/ui/webui/net_internals/net_internals_ui.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698