| 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/md_downloads/md_downloads_ui.h" | 5 #include "chrome/browser/ui/webui/md_downloads/md_downloads_ui.h" |
| 6 | 6 |
| 7 #include "base/memory/ref_counted_memory.h" | 7 #include "base/memory/ref_counted_memory.h" |
| 8 #include "base/memory/singleton.h" | 8 #include "base/memory/singleton.h" |
| 9 #include "base/strings/string_piece.h" | 9 #include "base/strings/string_piece.h" |
| 10 #include "base/threading/thread.h" | 10 #include "base/threading/thread.h" |
| (...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 109 #else | 109 #else |
| 110 source->AddResourcePath("action_service.html", | 110 source->AddResourcePath("action_service.html", |
| 111 IDR_MD_DOWNLOADS_ACTION_SERVICE_HTML); | 111 IDR_MD_DOWNLOADS_ACTION_SERVICE_HTML); |
| 112 source->AddResourcePath("action_service.js", | 112 source->AddResourcePath("action_service.js", |
| 113 IDR_MD_DOWNLOADS_ACTION_SERVICE_JS); | 113 IDR_MD_DOWNLOADS_ACTION_SERVICE_JS); |
| 114 source->AddResourcePath("constants.html", IDR_MD_DOWNLOADS_CONSTANTS_HTML); | 114 source->AddResourcePath("constants.html", IDR_MD_DOWNLOADS_CONSTANTS_HTML); |
| 115 source->AddResourcePath("constants.js", IDR_MD_DOWNLOADS_CONSTANTS_JS); | 115 source->AddResourcePath("constants.js", IDR_MD_DOWNLOADS_CONSTANTS_JS); |
| 116 source->AddResourcePath("downloads.js", IDR_MD_DOWNLOADS_DOWNLOADS_JS); | 116 source->AddResourcePath("downloads.js", IDR_MD_DOWNLOADS_DOWNLOADS_JS); |
| 117 source->AddResourcePath("i18n_setup.html", IDR_MD_DOWNLOADS_I18N_SETUP_HTML); | 117 source->AddResourcePath("i18n_setup.html", IDR_MD_DOWNLOADS_I18N_SETUP_HTML); |
| 118 source->AddResourcePath("icons.html", IDR_MD_DOWNLOADS_ICONS_HTML); | 118 source->AddResourcePath("icons.html", IDR_MD_DOWNLOADS_ICONS_HTML); |
| 119 source->AddResourcePath("item.css", IDR_MD_DOWNLOADS_ITEM_CSS); | |
| 120 source->AddResourcePath("item.html", IDR_MD_DOWNLOADS_ITEM_HTML); | 119 source->AddResourcePath("item.html", IDR_MD_DOWNLOADS_ITEM_HTML); |
| 121 source->AddResourcePath("item.js", IDR_MD_DOWNLOADS_ITEM_JS); | 120 source->AddResourcePath("item.js", IDR_MD_DOWNLOADS_ITEM_JS); |
| 122 source->AddResourcePath("manager.css", IDR_MD_DOWNLOADS_MANAGER_CSS); | |
| 123 source->AddResourcePath("manager.html", IDR_MD_DOWNLOADS_MANAGER_HTML); | 121 source->AddResourcePath("manager.html", IDR_MD_DOWNLOADS_MANAGER_HTML); |
| 124 source->AddResourcePath("manager.js", IDR_MD_DOWNLOADS_MANAGER_JS); | 122 source->AddResourcePath("manager.js", IDR_MD_DOWNLOADS_MANAGER_JS); |
| 125 source->AddResourcePath("shared_style.css", | |
| 126 IDR_MD_DOWNLOADS_SHARED_STYLE_CSS); | |
| 127 source->AddResourcePath("toolbar.css", IDR_MD_DOWNLOADS_TOOLBAR_CSS); | |
| 128 source->AddResourcePath("toolbar.html", IDR_MD_DOWNLOADS_TOOLBAR_HTML); | 123 source->AddResourcePath("toolbar.html", IDR_MD_DOWNLOADS_TOOLBAR_HTML); |
| 129 source->AddResourcePath("toolbar.js", IDR_MD_DOWNLOADS_TOOLBAR_JS); | 124 source->AddResourcePath("toolbar.js", IDR_MD_DOWNLOADS_TOOLBAR_JS); |
| 130 source->SetDefaultResource(IDR_MD_DOWNLOADS_DOWNLOADS_HTML); | 125 source->SetDefaultResource(IDR_MD_DOWNLOADS_DOWNLOADS_HTML); |
| 131 #endif | 126 #endif |
| 132 | 127 |
| 133 source->SetJsonPath("strings.js"); | 128 source->SetJsonPath("strings.js"); |
| 134 | 129 |
| 135 return source; | 130 return source; |
| 136 } | 131 } |
| 137 | 132 |
| (...skipping 20 matching lines...) Expand all Loading... |
| 158 content::URLDataSource::Add(profile, theme); | 153 content::URLDataSource::Add(profile, theme); |
| 159 #endif | 154 #endif |
| 160 } | 155 } |
| 161 | 156 |
| 162 // static | 157 // static |
| 163 base::RefCountedMemory* MdDownloadsUI::GetFaviconResourceBytes( | 158 base::RefCountedMemory* MdDownloadsUI::GetFaviconResourceBytes( |
| 164 ui::ScaleFactor scale_factor) { | 159 ui::ScaleFactor scale_factor) { |
| 165 return ResourceBundle::GetSharedInstance(). | 160 return ResourceBundle::GetSharedInstance(). |
| 166 LoadDataResourceBytesForScale(IDR_DOWNLOADS_FAVICON, scale_factor); | 161 LoadDataResourceBytesForScale(IDR_DOWNLOADS_FAVICON, scale_factor); |
| 167 } | 162 } |
| OLD | NEW |