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 #ifndef CHROME_BROWSER_UI_WEBUI_DOWNLOADS_DOM_HANDLER_H_ | 5 #ifndef CHROME_BROWSER_UI_WEBUI_DOWNLOADS_DOM_HANDLER_H_ |
6 #define CHROME_BROWSER_UI_WEBUI_DOWNLOADS_DOM_HANDLER_H_ | 6 #define CHROME_BROWSER_UI_WEBUI_DOWNLOADS_DOM_HANDLER_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
64 // Callback for the "remove" message - removes the file download from shelf | 64 // Callback for the "remove" message - removes the file download from shelf |
65 // and list. | 65 // and list. |
66 void HandleRemove(const base::ListValue* args); | 66 void HandleRemove(const base::ListValue* args); |
67 | 67 |
68 // Callback for the "cancel" message - cancels the download. | 68 // Callback for the "cancel" message - cancels the download. |
69 void HandleCancel(const base::ListValue* args); | 69 void HandleCancel(const base::ListValue* args); |
70 | 70 |
71 // Callback for the "clearAll" message - clears all the downloads. | 71 // Callback for the "clearAll" message - clears all the downloads. |
72 void HandleClearAll(const base::ListValue* args); | 72 void HandleClearAll(const base::ListValue* args); |
73 | 73 |
| 74 // Callback for the "openDownloadsFolder" message - opens the downloads folder |
| 75 void HandleOpenDownloadsFolder(const base::ListValue* args); |
| 76 |
74 private: | 77 private: |
75 // Send the current list of downloads to the page. | 78 // Send the current list of downloads to the page. |
76 void SendCurrentDownloads(); | 79 void SendCurrentDownloads(); |
77 | 80 |
78 // Clear all download items and their observers. | 81 // Clear all download items and their observers. |
79 void ClearDownloadItems(); | 82 void ClearDownloadItems(); |
80 | 83 |
81 // Return the download that corresponds to a given id. | 84 // Return the download that corresponds to a given id. |
82 DownloadItem* GetDownloadById(int id); | 85 DownloadItem* GetDownloadById(int id); |
83 | 86 |
(...skipping 14 matching lines...) Expand all Loading... |
98 // notification should follow close on the heels of such a change. | 101 // notification should follow close on the heels of such a change. |
99 typedef std::vector<DownloadItem*> OrderedDownloads; | 102 typedef std::vector<DownloadItem*> OrderedDownloads; |
100 OrderedDownloads download_items_; | 103 OrderedDownloads download_items_; |
101 | 104 |
102 base::ScopedCallbackFactory<DownloadsDOMHandler> callback_factory_; | 105 base::ScopedCallbackFactory<DownloadsDOMHandler> callback_factory_; |
103 | 106 |
104 DISALLOW_COPY_AND_ASSIGN(DownloadsDOMHandler); | 107 DISALLOW_COPY_AND_ASSIGN(DownloadsDOMHandler); |
105 }; | 108 }; |
106 | 109 |
107 #endif // CHROME_BROWSER_UI_WEBUI_DOWNLOADS_DOM_HANDLER_H_ | 110 #endif // CHROME_BROWSER_UI_WEBUI_DOWNLOADS_DOM_HANDLER_H_ |
OLD | NEW |