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 11 matching lines...) Expand all Loading... |
22 explicit DownloadsDOMHandler(DownloadManager* dlm); | 22 explicit DownloadsDOMHandler(DownloadManager* dlm); |
23 virtual ~DownloadsDOMHandler(); | 23 virtual ~DownloadsDOMHandler(); |
24 | 24 |
25 void Init(); | 25 void Init(); |
26 | 26 |
27 // DOMMessageHandler implementation. | 27 // DOMMessageHandler implementation. |
28 virtual void RegisterMessages(); | 28 virtual void RegisterMessages(); |
29 | 29 |
30 // DownloadItem::Observer interface | 30 // DownloadItem::Observer interface |
31 virtual void OnDownloadUpdated(DownloadItem* download); | 31 virtual void OnDownloadUpdated(DownloadItem* download); |
| 32 virtual void OnDownloadFileCompleted(DownloadItem* download) { } |
32 virtual void OnDownloadOpened(DownloadItem* download) { } | 33 virtual void OnDownloadOpened(DownloadItem* download) { } |
33 | 34 |
34 // DownloadManager::Observer interface | 35 // DownloadManager::Observer interface |
35 virtual void ModelChanged(); | 36 virtual void ModelChanged(); |
36 virtual void SetDownloads(std::vector<DownloadItem*>& downloads); | 37 virtual void SetDownloads(std::vector<DownloadItem*>& downloads); |
37 | 38 |
38 // Callback for the "getDownloads" message. | 39 // Callback for the "getDownloads" message. |
39 void HandleGetDownloads(const Value* value); | 40 void HandleGetDownloads(const Value* value); |
40 | 41 |
41 // Callback for the "openFile" message - opens the file in the shell. | 42 // Callback for the "openFile" message - opens the file in the shell. |
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
97 // The current set of visible DownloadItems for this view received from the | 98 // The current set of visible DownloadItems for this view received from the |
98 // DownloadManager. DownloadManager owns the DownloadItems. The vector is | 99 // DownloadManager. DownloadManager owns the DownloadItems. The vector is |
99 // kept in order, sorted by ascending start time. | 100 // kept in order, sorted by ascending start time. |
100 typedef std::vector<DownloadItem*> OrderedDownloads; | 101 typedef std::vector<DownloadItem*> OrderedDownloads; |
101 OrderedDownloads download_items_; | 102 OrderedDownloads download_items_; |
102 | 103 |
103 DISALLOW_COPY_AND_ASSIGN(DownloadsDOMHandler); | 104 DISALLOW_COPY_AND_ASSIGN(DownloadsDOMHandler); |
104 }; | 105 }; |
105 | 106 |
106 #endif // CHROME_BROWSER_DOM_UI_DOWNLOADS_DOM_HANDLER_H_ | 107 #endif // CHROME_BROWSER_DOM_UI_DOWNLOADS_DOM_HANDLER_H_ |
OLD | NEW |