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/string_piece.h" | 9 #include "base/string_piece.h" |
10 #include "base/thread.h" | 10 #include "base/thread.h" |
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
86 | 86 |
87 // Controls. | 87 // Controls. |
88 localized_strings.SetString(L"control_pause", | 88 localized_strings.SetString(L"control_pause", |
89 l10n_util::GetString(IDS_DOWNLOAD_LINK_PAUSE)); | 89 l10n_util::GetString(IDS_DOWNLOAD_LINK_PAUSE)); |
90 localized_strings.SetString(L"control_showinfolder", | 90 localized_strings.SetString(L"control_showinfolder", |
91 l10n_util::GetString(IDS_DOWNLOAD_LINK_SHOW)); | 91 l10n_util::GetString(IDS_DOWNLOAD_LINK_SHOW)); |
92 localized_strings.SetString(L"control_cancel", | 92 localized_strings.SetString(L"control_cancel", |
93 l10n_util::GetString(IDS_DOWNLOAD_LINK_CANCEL)); | 93 l10n_util::GetString(IDS_DOWNLOAD_LINK_CANCEL)); |
94 localized_strings.SetString(L"control_resume", | 94 localized_strings.SetString(L"control_resume", |
95 l10n_util::GetString(IDS_DOWNLOAD_LINK_RESUME)); | 95 l10n_util::GetString(IDS_DOWNLOAD_LINK_RESUME)); |
| 96 localized_strings.SetString(L"control_removefromlist", |
| 97 l10n_util::GetString(IDS_DOWNLOAD_LINK_REMOVE)); |
96 | 98 |
97 SetFontAndTextDirection(&localized_strings); | 99 SetFontAndTextDirection(&localized_strings); |
98 | 100 |
99 static const StringPiece downloads_html( | 101 static const StringPiece downloads_html( |
100 ResourceBundle::GetSharedInstance().GetRawDataResource( | 102 ResourceBundle::GetSharedInstance().GetRawDataResource( |
101 IDR_DOWNLOADS_HTML)); | 103 IDR_DOWNLOADS_HTML)); |
102 const std::string full_html = jstemplate_builder::GetI18nTemplateHtml( | 104 const std::string full_html = jstemplate_builder::GetI18nTemplateHtml( |
103 downloads_html, &localized_strings); | 105 downloads_html, &localized_strings); |
104 | 106 |
105 scoped_refptr<RefCountedBytes> html_bytes(new RefCountedBytes); | 107 scoped_refptr<RefCountedBytes> html_bytes(new RefCountedBytes); |
(...skipping 21 matching lines...) Expand all Loading... |
127 handler->Init(); | 129 handler->Init(); |
128 | 130 |
129 DownloadsUIHTMLSource* html_source = new DownloadsUIHTMLSource(); | 131 DownloadsUIHTMLSource* html_source = new DownloadsUIHTMLSource(); |
130 | 132 |
131 // Set up the chrome://downloads/ source. | 133 // Set up the chrome://downloads/ source. |
132 g_browser_process->io_thread()->message_loop()->PostTask(FROM_HERE, | 134 g_browser_process->io_thread()->message_loop()->PostTask(FROM_HERE, |
133 NewRunnableMethod(&chrome_url_data_manager, | 135 NewRunnableMethod(&chrome_url_data_manager, |
134 &ChromeURLDataManager::AddDataSource, | 136 &ChromeURLDataManager::AddDataSource, |
135 html_source)); | 137 html_source)); |
136 } | 138 } |
OLD | NEW |