| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 17 matching lines...) Expand all Loading... |
| 28 // DOMMessageHandler implementation. | 28 // DOMMessageHandler implementation. |
| 29 virtual void RegisterMessages(); | 29 virtual void RegisterMessages(); |
| 30 | 30 |
| 31 // DownloadItem::Observer interface | 31 // DownloadItem::Observer interface |
| 32 virtual void OnDownloadUpdated(DownloadItem* download); | 32 virtual void OnDownloadUpdated(DownloadItem* download); |
| 33 virtual void OnDownloadFileCompleted(DownloadItem* download) { } | 33 virtual void OnDownloadFileCompleted(DownloadItem* download) { } |
| 34 virtual void OnDownloadOpened(DownloadItem* download) { } | 34 virtual void OnDownloadOpened(DownloadItem* download) { } |
| 35 | 35 |
| 36 // DownloadManager::Observer interface | 36 // DownloadManager::Observer interface |
| 37 virtual void ModelChanged(); | 37 virtual void ModelChanged(); |
| 38 virtual void SetDownloads(std::vector<DownloadItem*>& downloads); | 38 |
| 39 void OnSearchDownloadsComplete(std::vector<DownloadItem*> downloads); |
| 39 | 40 |
| 40 // Callback for the "getDownloads" message. | 41 // Callback for the "getDownloads" message. |
| 41 void HandleGetDownloads(const Value* value); | 42 void HandleGetDownloads(const Value* value); |
| 42 | 43 |
| 43 // Callback for the "openFile" message - opens the file in the shell. | 44 // Callback for the "openFile" message - opens the file in the shell. |
| 44 void HandleOpenFile(const Value* value); | 45 void HandleOpenFile(const Value* value); |
| 45 | 46 |
| 46 // Callback for the "drag" message - initiates a file object drag. | 47 // Callback for the "drag" message - initiates a file object drag. |
| 47 void HandleDrag(const Value* value); | 48 void HandleDrag(const Value* value); |
| 48 | 49 |
| (...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 92 // The current set of visible DownloadItems for this view received from the | 93 // The current set of visible DownloadItems for this view received from the |
| 93 // DownloadManager. DownloadManager owns the DownloadItems. The vector is | 94 // DownloadManager. DownloadManager owns the DownloadItems. The vector is |
| 94 // kept in order, sorted by ascending start time. | 95 // kept in order, sorted by ascending start time. |
| 95 typedef std::vector<DownloadItem*> OrderedDownloads; | 96 typedef std::vector<DownloadItem*> OrderedDownloads; |
| 96 OrderedDownloads download_items_; | 97 OrderedDownloads download_items_; |
| 97 | 98 |
| 98 DISALLOW_COPY_AND_ASSIGN(DownloadsDOMHandler); | 99 DISALLOW_COPY_AND_ASSIGN(DownloadsDOMHandler); |
| 99 }; | 100 }; |
| 100 | 101 |
| 101 #endif // CHROME_BROWSER_DOM_UI_DOWNLOADS_DOM_HANDLER_H_ | 102 #endif // CHROME_BROWSER_DOM_UI_DOWNLOADS_DOM_HANDLER_H_ |
| OLD | NEW |