| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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_WEBUI_DOWNLOADS_DOM_HANDLER_H_ | 5 #ifndef CHROME_BROWSER_WEBUI_DOWNLOADS_DOM_HANDLER_H_ |
| 6 #define CHROME_BROWSER_WEBUI_DOWNLOADS_DOM_HANDLER_H_ | 6 #define CHROME_BROWSER_WEBUI_DOWNLOADS_DOM_HANDLER_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| 11 #include "base/scoped_callback_factory.h" | 11 #include "base/scoped_callback_factory.h" |
| 12 #include "chrome/browser/download/download_item.h" | 12 #include "chrome/browser/download/download_item.h" |
| 13 #include "chrome/browser/download/download_manager.h" | 13 #include "chrome/browser/download/download_manager.h" |
| 14 #include "chrome/browser/webui/web_ui.h" | 14 #include "content/browser/webui/web_ui.h" |
| 15 | 15 |
| 16 class ListValue; | 16 class ListValue; |
| 17 | 17 |
| 18 // The handler for Javascript messages related to the "downloads" view, | 18 // The handler for Javascript messages related to the "downloads" view, |
| 19 // also observes changes to the download manager. | 19 // also observes changes to the download manager. |
| 20 class DownloadsDOMHandler : public WebUIMessageHandler, | 20 class DownloadsDOMHandler : public WebUIMessageHandler, |
| 21 public DownloadManager::Observer, | 21 public DownloadManager::Observer, |
| 22 public DownloadItem::Observer { | 22 public DownloadItem::Observer { |
| 23 public: | 23 public: |
| 24 explicit DownloadsDOMHandler(DownloadManager* dlm); | 24 explicit DownloadsDOMHandler(DownloadManager* dlm); |
| (...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 94 // kept in order, sorted by ascending start time. | 94 // kept in order, sorted by ascending start time. |
| 95 typedef std::vector<DownloadItem*> OrderedDownloads; | 95 typedef std::vector<DownloadItem*> OrderedDownloads; |
| 96 OrderedDownloads download_items_; | 96 OrderedDownloads download_items_; |
| 97 | 97 |
| 98 base::ScopedCallbackFactory<DownloadsDOMHandler> callback_factory_; | 98 base::ScopedCallbackFactory<DownloadsDOMHandler> callback_factory_; |
| 99 | 99 |
| 100 DISALLOW_COPY_AND_ASSIGN(DownloadsDOMHandler); | 100 DISALLOW_COPY_AND_ASSIGN(DownloadsDOMHandler); |
| 101 }; | 101 }; |
| 102 | 102 |
| 103 #endif // CHROME_BROWSER_WEBUI_DOWNLOADS_DOM_HANDLER_H_ | 103 #endif // CHROME_BROWSER_WEBUI_DOWNLOADS_DOM_HANDLER_H_ |
| OLD | NEW |