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 "base/gfx/png_encoder.h" | 8 #include "base/gfx/png_encoder.h" |
8 #include "base/string_piece.h" | 9 #include "base/string_piece.h" |
9 #include "base/thread.h" | 10 #include "base/thread.h" |
10 #include "base/time_format.h" | 11 #include "base/time_format.h" |
11 #include "chrome/browser/browser_process.h" | 12 #include "chrome/browser/browser_process.h" |
12 #include "chrome/browser/dom_ui/chrome_url_data_manager.h" | 13 #include "chrome/browser/dom_ui/chrome_url_data_manager.h" |
13 #include "chrome/browser/dom_ui/fileicon_source.h" | 14 #include "chrome/browser/dom_ui/fileicon_source.h" |
14 #include "chrome/browser/download/download_manager.h" | 15 #include "chrome/browser/download/download_manager.h" |
15 #if defined(OS_WIN) | 16 #if defined(OS_WIN) |
16 // TODO(port): re-enable when download_util is ported | 17 // TODO(port): re-enable when download_util is ported |
17 #include "chrome/browser/download/download_util.h" | 18 #include "chrome/browser/download/download_util.h" |
18 #endif | 19 #endif |
19 #include "chrome/browser/metrics/user_metrics.h" | 20 #include "chrome/browser/metrics/user_metrics.h" |
20 #include "chrome/browser/profile.h" | 21 #include "chrome/browser/profile.h" |
21 #include "chrome/common/jstemplate_builder.h" | 22 #include "chrome/common/jstemplate_builder.h" |
22 #include "chrome/common/l10n_util.h" | |
23 #include "chrome/common/time_format.h" | 23 #include "chrome/common/time_format.h" |
24 #include "chrome/common/url_constants.h" | 24 #include "chrome/common/url_constants.h" |
25 #include "grit/browser_resources.h" | 25 #include "grit/browser_resources.h" |
26 #include "grit/generated_resources.h" | 26 #include "grit/generated_resources.h" |
27 | 27 |
28 namespace { | 28 namespace { |
29 | 29 |
30 // Maximum number of downloads to show. TODO(glen): Remove this and instead | 30 // Maximum number of downloads to show. TODO(glen): Remove this and instead |
31 // stuff the downloads down the pipe slowly. | 31 // stuff the downloads down the pipe slowly. |
32 static const int kMaxDownloads = 150; | 32 static const int kMaxDownloads = 150; |
(...skipping 484 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
517 handler->Init(); | 517 handler->Init(); |
518 | 518 |
519 DownloadsUIHTMLSource* html_source = new DownloadsUIHTMLSource(); | 519 DownloadsUIHTMLSource* html_source = new DownloadsUIHTMLSource(); |
520 | 520 |
521 // Set up the chrome-ui://downloads/ source. | 521 // Set up the chrome-ui://downloads/ source. |
522 g_browser_process->io_thread()->message_loop()->PostTask(FROM_HERE, | 522 g_browser_process->io_thread()->message_loop()->PostTask(FROM_HERE, |
523 NewRunnableMethod(&chrome_url_data_manager, | 523 NewRunnableMethod(&chrome_url_data_manager, |
524 &ChromeURLDataManager::AddDataSource, | 524 &ChromeURLDataManager::AddDataSource, |
525 html_source)); | 525 html_source)); |
526 } | 526 } |
OLD | NEW |