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

Side by Side Diff: chrome/browser/ui/webui/downloads_ui.cc

Issue 1240853002: Slice MD downloads into more components (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: license Created 5 years, 5 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
« no previous file with comments | « chrome/browser/resources/md_downloads/toolbar.js ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/downloads_ui.h" 5 #include "chrome/browser/ui/webui/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/prefs/pref_service.h" 9 #include "base/prefs/pref_service.h"
10 #include "base/strings/string_piece.h" 10 #include "base/strings/string_piece.h"
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
90 90
91 source->SetJsonPath("strings.js"); 91 source->SetJsonPath("strings.js");
92 source->AddResourcePath("constants.html", IDR_DOWNLOADS_CONSTANTS_HTML); 92 source->AddResourcePath("constants.html", IDR_DOWNLOADS_CONSTANTS_HTML);
93 source->AddResourcePath("constants.js", IDR_DOWNLOADS_CONSTANTS_JS); 93 source->AddResourcePath("constants.js", IDR_DOWNLOADS_CONSTANTS_JS);
94 source->AddResourcePath("throttled_icon_loader.html", 94 source->AddResourcePath("throttled_icon_loader.html",
95 IDR_DOWNLOADS_THROTTLED_ICON_LOADER_HTML); 95 IDR_DOWNLOADS_THROTTLED_ICON_LOADER_HTML);
96 source->AddResourcePath("throttled_icon_loader.js", 96 source->AddResourcePath("throttled_icon_loader.js",
97 IDR_DOWNLOADS_THROTTLED_ICON_LOADER_JS); 97 IDR_DOWNLOADS_THROTTLED_ICON_LOADER_JS);
98 98
99 if (switches::MdDownloadsEnabled()) { 99 if (switches::MdDownloadsEnabled()) {
100 source->AddResourcePath("downloads.css", IDR_MD_DOWNLOADS_DOWNLOADS_CSS); 100 source->AddResourcePath("action_service.html",
101 IDR_MD_DOWNLOADS_ACTION_SERVICE_HTML);
102 source->AddResourcePath("action_service.js",
103 IDR_MD_DOWNLOADS_ACTION_SERVICE_JS);
104 source->AddResourcePath("item_view.css", IDR_MD_DOWNLOADS_ITEM_VIEW_CSS);
101 source->AddResourcePath("item_view.html", IDR_MD_DOWNLOADS_ITEM_VIEW_HTML); 105 source->AddResourcePath("item_view.html", IDR_MD_DOWNLOADS_ITEM_VIEW_HTML);
102 source->AddResourcePath("item_view.js", IDR_MD_DOWNLOADS_ITEM_VIEW_JS); 106 source->AddResourcePath("item_view.js", IDR_MD_DOWNLOADS_ITEM_VIEW_JS);
107 source->AddResourcePath("manager.css", IDR_MD_DOWNLOADS_MANAGER_CSS);
103 source->AddResourcePath("manager.html", IDR_MD_DOWNLOADS_MANAGER_HTML); 108 source->AddResourcePath("manager.html", IDR_MD_DOWNLOADS_MANAGER_HTML);
104 source->AddResourcePath("manager.js", IDR_MD_DOWNLOADS_MANAGER_JS); 109 source->AddResourcePath("manager.js", IDR_MD_DOWNLOADS_MANAGER_JS);
110 source->AddResourcePath("shared_style.css",
111 IDR_MD_DOWNLOADS_SHARED_STYLE_CSS);
105 source->AddResourcePath("strings.html", IDR_MD_DOWNLOADS_STRINGS_HTML); 112 source->AddResourcePath("strings.html", IDR_MD_DOWNLOADS_STRINGS_HTML);
113 source->AddResourcePath("toolbar.css", IDR_MD_DOWNLOADS_TOOLBAR_CSS);
114 source->AddResourcePath("toolbar.html", IDR_MD_DOWNLOADS_TOOLBAR_HTML);
115 source->AddResourcePath("toolbar.js", IDR_MD_DOWNLOADS_TOOLBAR_JS);
106 source->SetDefaultResource(IDR_MD_DOWNLOADS_DOWNLOADS_HTML); 116 source->SetDefaultResource(IDR_MD_DOWNLOADS_DOWNLOADS_HTML);
107 } else { 117 } else {
108 source->AddResourcePath("item_view.js", IDR_DOWNLOADS_ITEM_VIEW_JS); 118 source->AddResourcePath("item_view.js", IDR_DOWNLOADS_ITEM_VIEW_JS);
109 source->AddResourcePath("focus_row.js", IDR_DOWNLOADS_FOCUS_ROW_JS); 119 source->AddResourcePath("focus_row.js", IDR_DOWNLOADS_FOCUS_ROW_JS);
110 source->AddResourcePath("manager.js", IDR_DOWNLOADS_MANAGER_JS); 120 source->AddResourcePath("manager.js", IDR_DOWNLOADS_MANAGER_JS);
111 source->SetDefaultResource(IDR_DOWNLOADS_DOWNLOADS_HTML); 121 source->SetDefaultResource(IDR_DOWNLOADS_DOWNLOADS_HTML);
112 } 122 }
113 123
114 return source; 124 return source;
115 } 125 }
(...skipping 21 matching lines...) Expand all
137 content::URLDataSource::Add(profile, theme); 147 content::URLDataSource::Add(profile, theme);
138 #endif 148 #endif
139 } 149 }
140 150
141 // static 151 // static
142 base::RefCountedMemory* DownloadsUI::GetFaviconResourceBytes( 152 base::RefCountedMemory* DownloadsUI::GetFaviconResourceBytes(
143 ui::ScaleFactor scale_factor) { 153 ui::ScaleFactor scale_factor) {
144 return ResourceBundle::GetSharedInstance(). 154 return ResourceBundle::GetSharedInstance().
145 LoadDataResourceBytesForScale(IDR_DOWNLOADS_FAVICON, scale_factor); 155 LoadDataResourceBytesForScale(IDR_DOWNLOADS_FAVICON, scale_factor);
146 } 156 }
OLDNEW
« no previous file with comments | « chrome/browser/resources/md_downloads/toolbar.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698