| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 64 if (browser_defaults::kDownloadPageHasShowInFolder) { | 64 if (browser_defaults::kDownloadPageHasShowInFolder) { |
| 65 source->AddLocalizedString("control_showinfolder", IDS_DOWNLOAD_LINK_SHOW); | 65 source->AddLocalizedString("control_showinfolder", IDS_DOWNLOAD_LINK_SHOW); |
| 66 } | 66 } |
| 67 source->AddLocalizedString("control_retry", IDS_DOWNLOAD_LINK_RETRY); | 67 source->AddLocalizedString("control_retry", IDS_DOWNLOAD_LINK_RETRY); |
| 68 source->AddLocalizedString("control_cancel", IDS_DOWNLOAD_LINK_CANCEL); | 68 source->AddLocalizedString("control_cancel", IDS_DOWNLOAD_LINK_CANCEL); |
| 69 source->AddLocalizedString("control_resume", IDS_DOWNLOAD_LINK_RESUME); | 69 source->AddLocalizedString("control_resume", IDS_DOWNLOAD_LINK_RESUME); |
| 70 source->AddLocalizedString("control_removefromlist", | 70 source->AddLocalizedString("control_removefromlist", |
| 71 IDS_DOWNLOAD_LINK_REMOVE); | 71 IDS_DOWNLOAD_LINK_REMOVE); |
| 72 | 72 |
| 73 source->set_json_path("strings.js"); | 73 source->set_json_path("strings.js"); |
| 74 source->add_resource_path("downloads.css", IDR_DOWNLOADS_CSS); |
| 74 source->add_resource_path("downloads.js", IDR_DOWNLOADS_JS); | 75 source->add_resource_path("downloads.js", IDR_DOWNLOADS_JS); |
| 75 source->set_default_resource(IDR_DOWNLOADS_HTML); | 76 source->set_default_resource(IDR_DOWNLOADS_HTML); |
| 76 | 77 |
| 77 return source; | 78 return source; |
| 78 } | 79 } |
| 79 | 80 |
| 80 } // namespace | 81 } // namespace |
| 81 | 82 |
| 82 /////////////////////////////////////////////////////////////////////////////// | 83 /////////////////////////////////////////////////////////////////////////////// |
| 83 // | 84 // |
| (...skipping 12 matching lines...) Expand all Loading... |
| 96 // Set up the chrome://downloads/ source. | 97 // Set up the chrome://downloads/ source. |
| 97 profile->GetChromeURLDataManager()->AddDataSource( | 98 profile->GetChromeURLDataManager()->AddDataSource( |
| 98 CreateDownloadsUIHTMLSource()); | 99 CreateDownloadsUIHTMLSource()); |
| 99 } | 100 } |
| 100 | 101 |
| 101 // static | 102 // static |
| 102 RefCountedMemory* DownloadsUI::GetFaviconResourceBytes() { | 103 RefCountedMemory* DownloadsUI::GetFaviconResourceBytes() { |
| 103 return ResourceBundle::GetSharedInstance(). | 104 return ResourceBundle::GetSharedInstance(). |
| 104 LoadDataResourceBytes(IDR_DOWNLOADS_FAVICON); | 105 LoadDataResourceBytes(IDR_DOWNLOADS_FAVICON); |
| 105 } | 106 } |
| OLD | NEW |