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

Side by Side Diff: chrome/browser/ui/webui/extensions/extensions_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/extensions/extensions_ui.h" 5 #include "chrome/browser/ui/webui/extensions/extensions_ui.h"
6 6
7 #include "chrome/browser/profiles/profile.h" 7 #include "chrome/browser/profiles/profile.h"
8 #include "chrome/browser/ui/webui/extensions/command_handler.h" 8 #include "chrome/browser/ui/webui/extensions/command_handler.h"
9 #include "chrome/browser/ui/webui/extensions/extension_error_handler.h" 9 #include "chrome/browser/ui/webui/extensions/extension_error_handler.h"
10 #include "chrome/browser/ui/webui/extensions/extension_loader_handler.h" 10 #include "chrome/browser/ui/webui/extensions/extension_loader_handler.h"
(...skipping 13 matching lines...) Expand all
24 #endif 24 #endif
25 25
26 namespace extensions { 26 namespace extensions {
27 27
28 namespace { 28 namespace {
29 29
30 content::WebUIDataSource* CreateExtensionsHTMLSource() { 30 content::WebUIDataSource* CreateExtensionsHTMLSource() {
31 content::WebUIDataSource* source = 31 content::WebUIDataSource* source =
32 content::WebUIDataSource::Create(chrome::kChromeUIExtensionsFrameHost); 32 content::WebUIDataSource::Create(chrome::kChromeUIExtensionsFrameHost);
33 33
34 source->SetUseJsonJSFormatV2();
35 source->SetJsonPath("strings.js"); 34 source->SetJsonPath("strings.js");
36 source->AddResourcePath("extensions.js", IDR_EXTENSIONS_JS); 35 source->AddResourcePath("extensions.js", IDR_EXTENSIONS_JS);
37 source->AddResourcePath("extension_command_list.js", 36 source->AddResourcePath("extension_command_list.js",
38 IDR_EXTENSION_COMMAND_LIST_JS); 37 IDR_EXTENSION_COMMAND_LIST_JS);
39 source->AddResourcePath("extension_list.js", IDR_EXTENSION_LIST_JS); 38 source->AddResourcePath("extension_list.js", IDR_EXTENSION_LIST_JS);
40 source->SetDefaultResource(IDR_EXTENSIONS_HTML); 39 source->SetDefaultResource(IDR_EXTENSIONS_HTML);
41 source->DisableDenyXFrameOptions(); 40 source->DisableDenyXFrameOptions();
42 return source; 41 return source;
43 } 42 }
44 43
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
94 ExtensionsUI::~ExtensionsUI() {} 93 ExtensionsUI::~ExtensionsUI() {}
95 94
96 // static 95 // static
97 base::RefCountedMemory* ExtensionsUI::GetFaviconResourceBytes( 96 base::RefCountedMemory* ExtensionsUI::GetFaviconResourceBytes(
98 ui::ScaleFactor scale_factor) { 97 ui::ScaleFactor scale_factor) {
99 ui::ResourceBundle& rb = ui::ResourceBundle::GetSharedInstance(); 98 ui::ResourceBundle& rb = ui::ResourceBundle::GetSharedInstance();
100 return rb.LoadDataResourceBytesForScale(IDR_EXTENSIONS_FAVICON, scale_factor); 99 return rb.LoadDataResourceBytesForScale(IDR_EXTENSIONS_FAVICON, scale_factor);
101 } 100 }
102 101
103 } // namespace extensions 102 } // namespace extensions
OLDNEW
« no previous file with comments | « chrome/browser/ui/webui/extensions/extension_info_ui.cc ('k') | chrome/browser/ui/webui/flags_ui.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698