OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/singleton.h" | 7 #include "base/memory/singleton.h" |
8 #include "base/string_piece.h" | 8 #include "base/string_piece.h" |
9 #include "base/threading/thread.h" | 9 #include "base/threading/thread.h" |
10 #include "base/values.h" | 10 #include "base/values.h" |
(...skipping 18 matching lines...) Expand all Loading... |
29 ChromeWebUIDataSource *CreateDownloadsUIHTMLSource() { | 29 ChromeWebUIDataSource *CreateDownloadsUIHTMLSource() { |
30 ChromeWebUIDataSource *source = | 30 ChromeWebUIDataSource *source = |
31 new ChromeWebUIDataSource(chrome::kChromeUIDownloadsHost); | 31 new ChromeWebUIDataSource(chrome::kChromeUIDownloadsHost); |
32 | 32 |
33 source->AddLocalizedString("title", IDS_DOWNLOAD_TITLE); | 33 source->AddLocalizedString("title", IDS_DOWNLOAD_TITLE); |
34 source->AddLocalizedString("searchbutton", IDS_DOWNLOAD_SEARCH_BUTTON); | 34 source->AddLocalizedString("searchbutton", IDS_DOWNLOAD_SEARCH_BUTTON); |
35 source->AddLocalizedString("no_results", IDS_DOWNLOAD_SEARCH_BUTTON); | 35 source->AddLocalizedString("no_results", IDS_DOWNLOAD_SEARCH_BUTTON); |
36 source->AddLocalizedString("searchresultsfor", IDS_DOWNLOAD_SEARCHRESULTSFOR); | 36 source->AddLocalizedString("searchresultsfor", IDS_DOWNLOAD_SEARCHRESULTSFOR); |
37 source->AddLocalizedString("downloads", IDS_DOWNLOAD_TITLE); | 37 source->AddLocalizedString("downloads", IDS_DOWNLOAD_TITLE); |
38 source->AddLocalizedString("clear_all", IDS_DOWNLOAD_LINK_CLEAR_ALL); | 38 source->AddLocalizedString("clear_all", IDS_DOWNLOAD_LINK_CLEAR_ALL); |
| 39 source->AddLocalizedString("open_downloads_folder", |
| 40 IDS_DOWNLOAD_LINK_OPEN_DOWNLOADS_FOLDER); |
39 | 41 |
40 // Status. | 42 // Status. |
41 source->AddLocalizedString("status_cancelled", IDS_DOWNLOAD_TAB_CANCELED); | 43 source->AddLocalizedString("status_cancelled", IDS_DOWNLOAD_TAB_CANCELED); |
42 source->AddLocalizedString("status_removed", IDS_DOWNLOAD_FILE_REMOVED); | 44 source->AddLocalizedString("status_removed", IDS_DOWNLOAD_FILE_REMOVED); |
43 source->AddLocalizedString("status_paused", IDS_DOWNLOAD_PROGRESS_PAUSED); | 45 source->AddLocalizedString("status_paused", IDS_DOWNLOAD_PROGRESS_PAUSED); |
44 source->AddLocalizedString("status_interrupted", | 46 source->AddLocalizedString("status_interrupted", |
45 IDS_DOWNLOAD_PROGRESS_INTERRUPTED); | 47 IDS_DOWNLOAD_PROGRESS_INTERRUPTED); |
46 | 48 |
47 // Dangerous file. | 49 // Dangerous file. |
48 source->AddLocalizedString("danger_file_desc", IDS_PROMPT_DANGEROUS_DOWNLOAD); | 50 source->AddLocalizedString("danger_file_desc", IDS_PROMPT_DANGEROUS_DOWNLOAD); |
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
87 // Set up the chrome://downloads/ source. | 89 // Set up the chrome://downloads/ source. |
88 contents->profile()->GetChromeURLDataManager()->AddDataSource( | 90 contents->profile()->GetChromeURLDataManager()->AddDataSource( |
89 CreateDownloadsUIHTMLSource()); | 91 CreateDownloadsUIHTMLSource()); |
90 } | 92 } |
91 | 93 |
92 // static | 94 // static |
93 RefCountedMemory* DownloadsUI::GetFaviconResourceBytes() { | 95 RefCountedMemory* DownloadsUI::GetFaviconResourceBytes() { |
94 return ResourceBundle::GetSharedInstance(). | 96 return ResourceBundle::GetSharedInstance(). |
95 LoadDataResourceBytes(IDR_DOWNLOADS_FAVICON); | 97 LoadDataResourceBytes(IDR_DOWNLOADS_FAVICON); |
96 } | 98 } |
OLD | NEW |