OLD | NEW |
1 // Copyright (c) 2006-2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2009 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/dom_ui/downloads_ui.h" | 5 #include "chrome/browser/dom_ui/downloads_ui.h" |
6 | 6 |
7 #include "app/l10n_util.h" | 7 #include "app/l10n_util.h" |
8 #include "app/resource_bundle.h" | 8 #include "app/resource_bundle.h" |
9 #include "base/singleton.h" | 9 #include "base/singleton.h" |
10 #include "base/string_piece.h" | 10 #include "base/string_piece.h" |
11 #include "base/thread.h" | 11 #include "base/thread.h" |
12 #include "base/values.h" | 12 #include "base/values.h" |
13 #include "chrome/browser/chrome_thread.h" | 13 #include "chrome/browser/chrome_thread.h" |
14 #include "chrome/browser/dom_ui/chrome_url_data_manager.h" | 14 #include "chrome/browser/dom_ui/chrome_url_data_manager.h" |
15 #include "chrome/browser/dom_ui/downloads_dom_handler.h" | 15 #include "chrome/browser/dom_ui/downloads_dom_handler.h" |
16 #include "chrome/browser/download/download_manager.h" | 16 #include "chrome/browser/download/download_manager.h" |
17 #include "chrome/browser/profile.h" | 17 #include "chrome/browser/profile.h" |
18 #include "chrome/common/jstemplate_builder.h" | 18 #include "chrome/common/jstemplate_builder.h" |
19 #include "chrome/common/url_constants.h" | 19 #include "chrome/common/url_constants.h" |
20 #include "grit/browser_resources.h" | 20 #include "grit/browser_resources.h" |
21 #include "grit/generated_resources.h" | 21 #include "grit/generated_resources.h" |
22 #include "grit/theme_resources.h" | 22 #include "grit/theme_resources.h" |
23 | 23 |
24 #if defined(OS_WIN) | |
25 // TODO(port): re-enable when download_util is ported | |
26 #include "chrome/browser/download/download_util.h" | |
27 #else | |
28 #include "chrome/common/temp_scaffolding_stubs.h" | |
29 #endif | |
30 | |
31 | |
32 namespace { | 24 namespace { |
33 | 25 |
34 /////////////////////////////////////////////////////////////////////////////// | 26 /////////////////////////////////////////////////////////////////////////////// |
35 // | 27 // |
36 // DownloadsHTMLSource | 28 // DownloadsHTMLSource |
37 // | 29 // |
38 /////////////////////////////////////////////////////////////////////////////// | 30 /////////////////////////////////////////////////////////////////////////////// |
39 | 31 |
40 class DownloadsUIHTMLSource : public ChromeURLDataManager::DataSource { | 32 class DownloadsUIHTMLSource : public ChromeURLDataManager::DataSource { |
41 public: | 33 public: |
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
138 NewRunnableMethod(Singleton<ChromeURLDataManager>().get(), | 130 NewRunnableMethod(Singleton<ChromeURLDataManager>().get(), |
139 &ChromeURLDataManager::AddDataSource, | 131 &ChromeURLDataManager::AddDataSource, |
140 html_source)); | 132 html_source)); |
141 } | 133 } |
142 | 134 |
143 // static | 135 // static |
144 RefCountedMemory* DownloadsUI::GetFaviconResourceBytes() { | 136 RefCountedMemory* DownloadsUI::GetFaviconResourceBytes() { |
145 return ResourceBundle::GetSharedInstance(). | 137 return ResourceBundle::GetSharedInstance(). |
146 LoadImageResourceBytes(IDR_DOWNLOADS_FAVICON); | 138 LoadImageResourceBytes(IDR_DOWNLOADS_FAVICON); |
147 } | 139 } |
OLD | NEW |