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_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 16 matching lines...) Expand all Loading... |
27 explicit DownloadsDOMHandler(content::DownloadManager* dlm); | 27 explicit DownloadsDOMHandler(content::DownloadManager* dlm); |
28 virtual ~DownloadsDOMHandler(); | 28 virtual ~DownloadsDOMHandler(); |
29 | 29 |
30 void Init(); | 30 void Init(); |
31 | 31 |
32 // WebUIMessageHandler implementation. | 32 // WebUIMessageHandler implementation. |
33 virtual void RegisterMessages() OVERRIDE; | 33 virtual void RegisterMessages() OVERRIDE; |
34 | 34 |
35 // content::DownloadItem::Observer interface | 35 // content::DownloadItem::Observer interface |
36 virtual void OnDownloadUpdated(content::DownloadItem* download) OVERRIDE; | 36 virtual void OnDownloadUpdated(content::DownloadItem* download) OVERRIDE; |
37 virtual void OnDownloadOpened(content::DownloadItem* download) OVERRIDE { } | 37 virtual void OnDownloadDestroyed(content::DownloadItem* download) OVERRIDE; |
38 | 38 |
39 // content::DownloadManager::Observer interface | 39 // content::DownloadManager::Observer interface |
40 virtual void ModelChanged(content::DownloadManager* manager) OVERRIDE; | 40 virtual void ModelChanged(content::DownloadManager* manager) OVERRIDE; |
41 virtual void ManagerGoingDown(content::DownloadManager* manager) OVERRIDE; | 41 virtual void ManagerGoingDown(content::DownloadManager* manager) OVERRIDE; |
42 | 42 |
43 // Callback for the "onPageLoaded" message. | 43 // Callback for the "onPageLoaded" message. |
44 void OnPageLoaded(const base::ListValue* args); | 44 void OnPageLoaded(const base::ListValue* args); |
45 | 45 |
46 // Callback for the "getDownloads" message. | 46 // Callback for the "getDownloads" message. |
47 void HandleGetDownloads(const base::ListValue* args); | 47 void HandleGetDownloads(const base::ListValue* args); |
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
130 // notification should follow close on the heels of such a change. | 130 // notification should follow close on the heels of such a change. |
131 typedef std::vector<content::DownloadItem*> OrderedDownloads; | 131 typedef std::vector<content::DownloadItem*> OrderedDownloads; |
132 OrderedDownloads download_items_; | 132 OrderedDownloads download_items_; |
133 | 133 |
134 base::WeakPtrFactory<DownloadsDOMHandler> weak_ptr_factory_; | 134 base::WeakPtrFactory<DownloadsDOMHandler> weak_ptr_factory_; |
135 | 135 |
136 DISALLOW_COPY_AND_ASSIGN(DownloadsDOMHandler); | 136 DISALLOW_COPY_AND_ASSIGN(DownloadsDOMHandler); |
137 }; | 137 }; |
138 | 138 |
139 #endif // CHROME_BROWSER_UI_WEBUI_DOWNLOADS_DOM_HANDLER_H_ | 139 #endif // CHROME_BROWSER_UI_WEBUI_DOWNLOADS_DOM_HANDLER_H_ |
OLD | NEW |