| 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 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 56 : ChromeWebUIDataSource(chrome::kChromeUIDownloadsHost) { | 56 : ChromeWebUIDataSource(chrome::kChromeUIDownloadsHost) { |
| 57 AddLocalizedString("title", IDS_DOWNLOAD_TITLE); | 57 AddLocalizedString("title", IDS_DOWNLOAD_TITLE); |
| 58 AddLocalizedString("searchbutton", IDS_DOWNLOAD_SEARCH_BUTTON); | 58 AddLocalizedString("searchbutton", IDS_DOWNLOAD_SEARCH_BUTTON); |
| 59 AddLocalizedString("no_results", IDS_DOWNLOAD_SEARCH_BUTTON); | 59 AddLocalizedString("no_results", IDS_DOWNLOAD_SEARCH_BUTTON); |
| 60 AddLocalizedString("searchresultsfor", IDS_DOWNLOAD_SEARCHRESULTSFOR); | 60 AddLocalizedString("searchresultsfor", IDS_DOWNLOAD_SEARCHRESULTSFOR); |
| 61 AddLocalizedString("downloads", IDS_DOWNLOAD_TITLE); | 61 AddLocalizedString("downloads", IDS_DOWNLOAD_TITLE); |
| 62 AddLocalizedString("clear_all", IDS_DOWNLOAD_LINK_CLEAR_ALL); | 62 AddLocalizedString("clear_all", IDS_DOWNLOAD_LINK_CLEAR_ALL); |
| 63 | 63 |
| 64 // Status. | 64 // Status. |
| 65 AddLocalizedString("status_cancelled", IDS_DOWNLOAD_TAB_CANCELED); | 65 AddLocalizedString("status_cancelled", IDS_DOWNLOAD_TAB_CANCELED); |
| 66 AddLocalizedString("status_removed", IDS_DOWNLOAD_FILE_REMOVED); |
| 66 AddLocalizedString("status_paused", IDS_DOWNLOAD_PROGRESS_PAUSED); | 67 AddLocalizedString("status_paused", IDS_DOWNLOAD_PROGRESS_PAUSED); |
| 67 AddLocalizedString("status_interrupted", IDS_DOWNLOAD_PROGRESS_INTERRUPTED); | 68 AddLocalizedString("status_interrupted", IDS_DOWNLOAD_PROGRESS_INTERRUPTED); |
| 68 | 69 |
| 69 // Dangerous file. | 70 // Dangerous file. |
| 70 AddLocalizedString("danger_file_desc", IDS_PROMPT_DANGEROUS_DOWNLOAD); | 71 AddLocalizedString("danger_file_desc", IDS_PROMPT_DANGEROUS_DOWNLOAD); |
| 71 AddLocalizedString("danger_url_desc", IDS_PROMPT_UNSAFE_DOWNLOAD_URL); | 72 AddLocalizedString("danger_url_desc", IDS_PROMPT_UNSAFE_DOWNLOAD_URL); |
| 72 AddLocalizedString("danger_save", IDS_CONFIRM_DOWNLOAD); | 73 AddLocalizedString("danger_save", IDS_CONFIRM_DOWNLOAD); |
| 73 AddLocalizedString("danger_discard", IDS_DISCARD_DOWNLOAD); | 74 AddLocalizedString("danger_discard", IDS_DISCARD_DOWNLOAD); |
| 74 | 75 |
| 75 // Controls. | 76 // Controls. |
| (...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 121 | 122 |
| 122 // Set up the chrome://downloads/ source. | 123 // Set up the chrome://downloads/ source. |
| 123 contents->profile()->GetChromeURLDataManager()->AddDataSource(html_source); | 124 contents->profile()->GetChromeURLDataManager()->AddDataSource(html_source); |
| 124 } | 125 } |
| 125 | 126 |
| 126 // static | 127 // static |
| 127 RefCountedMemory* DownloadsUI::GetFaviconResourceBytes() { | 128 RefCountedMemory* DownloadsUI::GetFaviconResourceBytes() { |
| 128 return ResourceBundle::GetSharedInstance(). | 129 return ResourceBundle::GetSharedInstance(). |
| 129 LoadDataResourceBytes(IDR_DOWNLOADS_FAVICON); | 130 LoadDataResourceBytes(IDR_DOWNLOADS_FAVICON); |
| 130 } | 131 } |
| OLD | NEW |