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