| 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 #ifndef CHROME_BROWSER_DOM_UI_DOWNLOADS_DOM_HANDLER_H_ | 5 #ifndef CHROME_BROWSER_DOM_UI_DOWNLOADS_DOM_HANDLER_H_ |
| 6 #define CHROME_BROWSER_DOM_UI_DOWNLOADS_DOM_HANDLER_H_ | 6 #define CHROME_BROWSER_DOM_UI_DOWNLOADS_DOM_HANDLER_H_ |
| 7 | 7 |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "chrome/browser/dom_ui/dom_ui.h" | 10 #include "chrome/browser/dom_ui/dom_ui.h" |
| (...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 51 // Callback for the "discardDangerous" message - specifies that the user | 51 // Callback for the "discardDangerous" message - specifies that the user |
| 52 // wishes to discard (remove) a dangerous file. | 52 // wishes to discard (remove) a dangerous file. |
| 53 void HandleDiscardDangerous(const Value* value); | 53 void HandleDiscardDangerous(const Value* value); |
| 54 | 54 |
| 55 // Callback for the "show" message - shows the file in explorer. | 55 // Callback for the "show" message - shows the file in explorer. |
| 56 void HandleShow(const Value* value); | 56 void HandleShow(const Value* value); |
| 57 | 57 |
| 58 // Callback for the "pause" message - pauses the file download. | 58 // Callback for the "pause" message - pauses the file download. |
| 59 void HandlePause(const Value* value); | 59 void HandlePause(const Value* value); |
| 60 | 60 |
| 61 // Callback for the "remove" message - removes the file download from shelf |
| 62 // and list. |
| 63 void HandleRemove(const Value* value); |
| 64 |
| 61 // Callback for the "cancel" message - cancels the download. | 65 // Callback for the "cancel" message - cancels the download. |
| 62 void HandleCancel(const Value* value); | 66 void HandleCancel(const Value* value); |
| 63 | 67 |
| 64 // Callback for the "clearAll" message - clears all the downloads. | 68 // Callback for the "clearAll" message - clears all the downloads. |
| 65 void HandleClearAll(const Value* value); | 69 void HandleClearAll(const Value* value); |
| 66 | 70 |
| 67 private: | 71 private: |
| 68 // Send the current list of downloads to the page. | 72 // Send the current list of downloads to the page. |
| 69 void SendCurrentDownloads(); | 73 void SendCurrentDownloads(); |
| 70 | 74 |
| (...skipping 22 matching lines...) Expand all Loading... |
| 93 // The current set of visible DownloadItems for this view received from the | 97 // The current set of visible DownloadItems for this view received from the |
| 94 // DownloadManager. DownloadManager owns the DownloadItems. The vector is | 98 // DownloadManager. DownloadManager owns the DownloadItems. The vector is |
| 95 // kept in order, sorted by ascending start time. | 99 // kept in order, sorted by ascending start time. |
| 96 typedef std::vector<DownloadItem*> OrderedDownloads; | 100 typedef std::vector<DownloadItem*> OrderedDownloads; |
| 97 OrderedDownloads download_items_; | 101 OrderedDownloads download_items_; |
| 98 | 102 |
| 99 DISALLOW_COPY_AND_ASSIGN(DownloadsDOMHandler); | 103 DISALLOW_COPY_AND_ASSIGN(DownloadsDOMHandler); |
| 100 }; | 104 }; |
| 101 | 105 |
| 102 #endif // CHROME_BROWSER_DOM_UI_DOWNLOADS_DOM_HANDLER_H_ | 106 #endif // CHROME_BROWSER_DOM_UI_DOWNLOADS_DOM_HANDLER_H_ |
| OLD | NEW |