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

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

Issue 1313453002: Make cr.ui.Focus* play nice with Shadow DOM and MD chrome://downloads (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: merge Created 5 years, 4 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/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 84 matching lines...) Expand 10 before | Expand all | Expand 10 after
95 95
96 if (switches::MdDownloadsEnabled()) { 96 if (switches::MdDownloadsEnabled()) {
97 source->AddLocalizedString("search", IDS_MD_DOWNLOAD_SEARCH); 97 source->AddLocalizedString("search", IDS_MD_DOWNLOAD_SEARCH);
98 source->AddLocalizedString("controlRetry", IDS_MD_DOWNLOAD_LINK_RETRY); 98 source->AddLocalizedString("controlRetry", IDS_MD_DOWNLOAD_LINK_RETRY);
99 source->AddLocalizedString("noDownloads", IDS_MD_DOWNLOAD_NO_DOWNLOADS); 99 source->AddLocalizedString("noDownloads", IDS_MD_DOWNLOAD_NO_DOWNLOADS);
100 100
101 source->AddResourcePath("action_service.html", 101 source->AddResourcePath("action_service.html",
102 IDR_MD_DOWNLOADS_ACTION_SERVICE_HTML); 102 IDR_MD_DOWNLOADS_ACTION_SERVICE_HTML);
103 source->AddResourcePath("action_service.js", 103 source->AddResourcePath("action_service.js",
104 IDR_MD_DOWNLOADS_ACTION_SERVICE_JS); 104 IDR_MD_DOWNLOADS_ACTION_SERVICE_JS);
105 source->AddResourcePath("focus_row.html", IDR_MD_DOWNLOADS_FOCUS_ROW_HTML);
106 source->AddResourcePath("focus_row.js", IDR_MD_DOWNLOADS_FOCUS_ROW_JS);
105 source->AddResourcePath("item.css", IDR_MD_DOWNLOADS_ITEM_CSS); 107 source->AddResourcePath("item.css", IDR_MD_DOWNLOADS_ITEM_CSS);
106 source->AddResourcePath("item.html", IDR_MD_DOWNLOADS_ITEM_HTML); 108 source->AddResourcePath("item.html", IDR_MD_DOWNLOADS_ITEM_HTML);
107 source->AddResourcePath("item.js", IDR_MD_DOWNLOADS_ITEM_JS); 109 source->AddResourcePath("item.js", IDR_MD_DOWNLOADS_ITEM_JS);
108 source->AddResourcePath("manager.css", IDR_MD_DOWNLOADS_MANAGER_CSS); 110 source->AddResourcePath("manager.css", IDR_MD_DOWNLOADS_MANAGER_CSS);
109 source->AddResourcePath("manager.html", IDR_MD_DOWNLOADS_MANAGER_HTML); 111 source->AddResourcePath("manager.html", IDR_MD_DOWNLOADS_MANAGER_HTML);
110 source->AddResourcePath("manager.js", IDR_MD_DOWNLOADS_MANAGER_JS); 112 source->AddResourcePath("manager.js", IDR_MD_DOWNLOADS_MANAGER_JS);
111 source->AddResourcePath("shared_style.css", 113 source->AddResourcePath("shared_style.css",
112 IDR_MD_DOWNLOADS_SHARED_STYLE_CSS); 114 IDR_MD_DOWNLOADS_SHARED_STYLE_CSS);
113 source->AddResourcePath("strings.html", IDR_MD_DOWNLOADS_STRINGS_HTML); 115 source->AddResourcePath("strings.html", IDR_MD_DOWNLOADS_STRINGS_HTML);
114 source->AddResourcePath("toolbar.css", IDR_MD_DOWNLOADS_TOOLBAR_CSS); 116 source->AddResourcePath("toolbar.css", IDR_MD_DOWNLOADS_TOOLBAR_CSS);
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
152 content::URLDataSource::Add(profile, theme); 154 content::URLDataSource::Add(profile, theme);
153 #endif 155 #endif
154 } 156 }
155 157
156 // static 158 // static
157 base::RefCountedMemory* DownloadsUI::GetFaviconResourceBytes( 159 base::RefCountedMemory* DownloadsUI::GetFaviconResourceBytes(
158 ui::ScaleFactor scale_factor) { 160 ui::ScaleFactor scale_factor) {
159 return ResourceBundle::GetSharedInstance(). 161 return ResourceBundle::GetSharedInstance().
160 LoadDataResourceBytesForScale(IDR_DOWNLOADS_FAVICON, scale_factor); 162 LoadDataResourceBytesForScale(IDR_DOWNLOADS_FAVICON, scale_factor);
161 } 163 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698