OLD | NEW |
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/extension_loader_handler.h" | 8 #include "chrome/browser/ui/webui/extensions/extension_loader_handler.h" |
9 #include "chrome/browser/ui/webui/extensions/extension_settings_handler.h" | 9 #include "chrome/browser/ui/webui/extensions/extension_settings_handler.h" |
10 #include "chrome/browser/ui/webui/extensions/install_extension_handler.h" | 10 #include "chrome/browser/ui/webui/extensions/install_extension_handler.h" |
(...skipping 14 matching lines...) Expand all Loading... |
25 | 25 |
26 namespace extensions { | 26 namespace extensions { |
27 | 27 |
28 namespace { | 28 namespace { |
29 | 29 |
30 content::WebUIDataSource* CreateMdExtensionsSource() { | 30 content::WebUIDataSource* CreateMdExtensionsSource() { |
31 content::WebUIDataSource* source = | 31 content::WebUIDataSource* source = |
32 content::WebUIDataSource::Create(chrome::kChromeUIExtensionsHost); | 32 content::WebUIDataSource::Create(chrome::kChromeUIExtensionsHost); |
33 | 33 |
34 source->SetJsonPath("strings.js"); | 34 source->SetJsonPath("strings.js"); |
| 35 |
35 source->AddLocalizedString("title", | 36 source->AddLocalizedString("title", |
36 IDS_MANAGE_EXTENSIONS_SETTING_WINDOWS_TITLE); | 37 IDS_MANAGE_EXTENSIONS_SETTING_WINDOWS_TITLE); |
| 38 source->AddLocalizedString("toolbarTitle", IDS_MD_EXTENSIONS_TOOLBAR_TITLE); |
| 39 source->AddLocalizedString("search", IDS_MD_EXTENSIONS_SEARCH); |
| 40 |
| 41 source->AddResourcePath("manager.css", IDR_MD_EXTENSIONS_MANAGER_CSS); |
37 source->AddResourcePath("manager.html", IDR_MD_EXTENSIONS_MANAGER_HTML); | 42 source->AddResourcePath("manager.html", IDR_MD_EXTENSIONS_MANAGER_HTML); |
38 source->AddResourcePath("manager.js", IDR_MD_EXTENSIONS_MANAGER_JS); | 43 source->AddResourcePath("manager.js", IDR_MD_EXTENSIONS_MANAGER_JS); |
| 44 source->AddResourcePath("toolbar.css", IDR_MD_EXTENSIONS_TOOLBAR_CSS); |
| 45 source->AddResourcePath("toolbar.html", IDR_MD_EXTENSIONS_TOOLBAR_HTML); |
| 46 source->AddResourcePath("toolbar.js", IDR_MD_EXTENSIONS_TOOLBAR_JS); |
39 source->AddResourcePath("strings.html", IDR_MD_EXTENSIONS_STRINGS_HTML); | 47 source->AddResourcePath("strings.html", IDR_MD_EXTENSIONS_STRINGS_HTML); |
40 source->SetDefaultResource(IDR_MD_EXTENSIONS_EXTENSIONS_HTML); | 48 source->SetDefaultResource(IDR_MD_EXTENSIONS_EXTENSIONS_HTML); |
41 | 49 |
42 return source; | 50 return source; |
43 } | 51 } |
44 | 52 |
45 content::WebUIDataSource* CreateExtensionsHTMLSource() { | 53 content::WebUIDataSource* CreateExtensionsHTMLSource() { |
46 content::WebUIDataSource* source = | 54 content::WebUIDataSource* source = |
47 content::WebUIDataSource::Create(chrome::kChromeUIExtensionsFrameHost); | 55 content::WebUIDataSource::Create(chrome::kChromeUIExtensionsFrameHost); |
48 | 56 |
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
103 ExtensionsUI::~ExtensionsUI() {} | 111 ExtensionsUI::~ExtensionsUI() {} |
104 | 112 |
105 // static | 113 // static |
106 base::RefCountedMemory* ExtensionsUI::GetFaviconResourceBytes( | 114 base::RefCountedMemory* ExtensionsUI::GetFaviconResourceBytes( |
107 ui::ScaleFactor scale_factor) { | 115 ui::ScaleFactor scale_factor) { |
108 ui::ResourceBundle& rb = ui::ResourceBundle::GetSharedInstance(); | 116 ui::ResourceBundle& rb = ui::ResourceBundle::GetSharedInstance(); |
109 return rb.LoadDataResourceBytesForScale(IDR_EXTENSIONS_FAVICON, scale_factor); | 117 return rb.LoadDataResourceBytesForScale(IDR_EXTENSIONS_FAVICON, scale_factor); |
110 } | 118 } |
111 | 119 |
112 } // namespace extensions | 120 } // namespace extensions |
OLD | NEW |