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/prefs/pref_service.h" | |
10 #include "base/strings/string_piece.h" | 9 #include "base/strings/string_piece.h" |
11 #include "base/threading/thread.h" | 10 #include "base/threading/thread.h" |
12 #include "base/values.h" | 11 #include "base/values.h" |
13 #include "chrome/browser/defaults.h" | 12 #include "chrome/browser/defaults.h" |
14 #include "chrome/browser/download/download_service.h" | 13 #include "chrome/browser/download/download_service.h" |
15 #include "chrome/browser/download/download_service_factory.h" | 14 #include "chrome/browser/download/download_service_factory.h" |
16 #include "chrome/browser/profiles/profile.h" | 15 #include "chrome/browser/profiles/profile.h" |
17 #include "chrome/browser/ui/webui/md_downloads/md_downloads_dom_handler.h" | 16 #include "chrome/browser/ui/webui/md_downloads/md_downloads_dom_handler.h" |
18 #include "chrome/browser/ui/webui/theme_source.h" | 17 #include "chrome/browser/ui/webui/theme_source.h" |
19 #include "chrome/common/chrome_switches.h" | 18 #include "chrome/common/chrome_switches.h" |
20 #include "chrome/common/features.h" | 19 #include "chrome/common/features.h" |
21 #include "chrome/common/pref_names.h" | 20 #include "chrome/common/pref_names.h" |
22 #include "chrome/common/url_constants.h" | 21 #include "chrome/common/url_constants.h" |
23 #include "chrome/grit/chromium_strings.h" | 22 #include "chrome/grit/chromium_strings.h" |
24 #include "chrome/grit/generated_resources.h" | 23 #include "chrome/grit/generated_resources.h" |
| 24 #include "components/prefs/pref_service.h" |
25 #include "content/public/browser/download_manager.h" | 25 #include "content/public/browser/download_manager.h" |
26 #include "content/public/browser/url_data_source.h" | 26 #include "content/public/browser/url_data_source.h" |
27 #include "content/public/browser/web_contents.h" | 27 #include "content/public/browser/web_contents.h" |
28 #include "content/public/browser/web_ui.h" | 28 #include "content/public/browser/web_ui.h" |
29 #include "content/public/browser/web_ui_data_source.h" | 29 #include "content/public/browser/web_ui_data_source.h" |
30 #include "grit/browser_resources.h" | 30 #include "grit/browser_resources.h" |
31 #include "grit/theme_resources.h" | 31 #include "grit/theme_resources.h" |
32 #include "ui/base/resource/resource_bundle.h" | 32 #include "ui/base/resource/resource_bundle.h" |
33 | 33 |
34 using content::BrowserContext; | 34 using content::BrowserContext; |
(...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
163 base::RefCountedMemory* MdDownloadsUI::GetFaviconResourceBytes( | 163 base::RefCountedMemory* MdDownloadsUI::GetFaviconResourceBytes( |
164 ui::ScaleFactor scale_factor) { | 164 ui::ScaleFactor scale_factor) { |
165 return ResourceBundle::GetSharedInstance(). | 165 return ResourceBundle::GetSharedInstance(). |
166 LoadDataResourceBytesForScale(IDR_DOWNLOADS_FAVICON, scale_factor); | 166 LoadDataResourceBytesForScale(IDR_DOWNLOADS_FAVICON, scale_factor); |
167 } | 167 } |
168 | 168 |
169 void MdDownloadsUI::RenderViewReused( | 169 void MdDownloadsUI::RenderViewReused( |
170 content::RenderViewHost* render_view_host) { | 170 content::RenderViewHost* render_view_host) { |
171 handler_->RenderViewReused(render_view_host); | 171 handler_->RenderViewReused(render_view_host); |
172 } | 172 } |
OLD | NEW |