| 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 #ifndef CHROME_BROWSER_UI_WEBUI_MD_DOWNLOADS_MD_DOWNLOADS_DOM_HANDLER_H_ | 5 #ifndef CHROME_BROWSER_UI_WEBUI_MD_DOWNLOADS_MD_DOWNLOADS_DOM_HANDLER_H_ |
| 6 #define CHROME_BROWSER_UI_WEBUI_MD_DOWNLOADS_MD_DOWNLOADS_DOM_HANDLER_H_ | 6 #define CHROME_BROWSER_UI_WEBUI_MD_DOWNLOADS_MD_DOWNLOADS_DOM_HANDLER_H_ |
| 7 | 7 |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include <set> | 10 #include <set> |
| (...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 123 | 123 |
| 124 // Returns the download that is referred to in a given value. | 124 // Returns the download that is referred to in a given value. |
| 125 content::DownloadItem* GetDownloadByValue(const base::ListValue* args); | 125 content::DownloadItem* GetDownloadByValue(const base::ListValue* args); |
| 126 | 126 |
| 127 // Returns the download with |id| or NULL if it doesn't exist. | 127 // Returns the download with |id| or NULL if it doesn't exist. |
| 128 content::DownloadItem* GetDownloadById(uint32_t id); | 128 content::DownloadItem* GetDownloadById(uint32_t id); |
| 129 | 129 |
| 130 // Remove all downloads in |to_remove| with the ability to undo removal later. | 130 // Remove all downloads in |to_remove| with the ability to undo removal later. |
| 131 void RemoveDownloads(const DownloadVector& to_remove); | 131 void RemoveDownloads(const DownloadVector& to_remove); |
| 132 | 132 |
| 133 // Checks whether a download's file was removed from its original location. |
| 134 void CheckForRemovedFiles(); |
| 135 |
| 133 DownloadsListTracker list_tracker_; | 136 DownloadsListTracker list_tracker_; |
| 134 | 137 |
| 135 // IDs of downloads to remove when this handler gets deleted. | 138 // IDs of downloads to remove when this handler gets deleted. |
| 136 std::vector<IdSet> removals_; | 139 std::vector<IdSet> removals_; |
| 137 | 140 |
| 138 base::WeakPtrFactory<MdDownloadsDOMHandler> weak_ptr_factory_; | 141 base::WeakPtrFactory<MdDownloadsDOMHandler> weak_ptr_factory_; |
| 139 | 142 |
| 140 DISALLOW_COPY_AND_ASSIGN(MdDownloadsDOMHandler); | 143 DISALLOW_COPY_AND_ASSIGN(MdDownloadsDOMHandler); |
| 141 }; | 144 }; |
| 142 | 145 |
| 143 #endif // CHROME_BROWSER_UI_WEBUI_MD_DOWNLOADS_MD_DOWNLOADS_DOM_HANDLER_H_ | 146 #endif // CHROME_BROWSER_UI_WEBUI_MD_DOWNLOADS_MD_DOWNLOADS_DOM_HANDLER_H_ |
| OLD | NEW |