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

Side by Side Diff: chrome/browser/ui/webui/md_downloads/md_downloads_ui.cc

Issue 2561013002: Remove the enable_themes build flag and define. (Closed)
Patch Set: Merge Created 4 years 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/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 130 matching lines...) Expand 10 before | Expand all | Expand 10 after
141 MdDownloadsUI::MdDownloadsUI(content::WebUI* web_ui) : WebUIController(web_ui) { 141 MdDownloadsUI::MdDownloadsUI(content::WebUI* web_ui) : WebUIController(web_ui) {
142 Profile* profile = Profile::FromWebUI(web_ui); 142 Profile* profile = Profile::FromWebUI(web_ui);
143 DownloadManager* dlm = BrowserContext::GetDownloadManager(profile); 143 DownloadManager* dlm = BrowserContext::GetDownloadManager(profile);
144 144
145 handler_ = new MdDownloadsDOMHandler(dlm, web_ui); 145 handler_ = new MdDownloadsDOMHandler(dlm, web_ui);
146 web_ui->AddMessageHandler(handler_); 146 web_ui->AddMessageHandler(handler_);
147 147
148 // Set up the chrome://downloads/ source. 148 // Set up the chrome://downloads/ source.
149 content::WebUIDataSource* source = CreateDownloadsUIHTMLSource(profile); 149 content::WebUIDataSource* source = CreateDownloadsUIHTMLSource(profile);
150 content::WebUIDataSource::Add(profile, source); 150 content::WebUIDataSource::Add(profile, source);
151 #if defined(ENABLE_THEMES)
152 ThemeSource* theme = new ThemeSource(profile); 151 ThemeSource* theme = new ThemeSource(profile);
153 content::URLDataSource::Add(profile, theme); 152 content::URLDataSource::Add(profile, theme);
154 #endif
155 } 153 }
156 154
157 // static 155 // static
158 base::RefCountedMemory* MdDownloadsUI::GetFaviconResourceBytes( 156 base::RefCountedMemory* MdDownloadsUI::GetFaviconResourceBytes(
159 ui::ScaleFactor scale_factor) { 157 ui::ScaleFactor scale_factor) {
160 return ResourceBundle::GetSharedInstance(). 158 return ResourceBundle::GetSharedInstance().
161 LoadDataResourceBytesForScale(IDR_DOWNLOADS_FAVICON, scale_factor); 159 LoadDataResourceBytesForScale(IDR_DOWNLOADS_FAVICON, scale_factor);
162 } 160 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/webui/app_launcher_page_ui.cc ('k') | chrome/browser/ui/webui/ntp/app_resource_cache_factory.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698