| 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_MD_DOWNLOADS_MD_DOWNLOADS_DOM_HANDLER_H_ | 5 #ifndef CHROME_BROWSER_UI_WEBUI_MD_DOWNLOADS_MD_DOWNLOADS_DOM_HANDLER_H_ |
| 6 #define CHROME_BROWSER_UI_WEBUI_MD_DOWNLOADS_MD_DOWNLOADS_DOM_HANDLER_H_ | 6 #define CHROME_BROWSER_UI_WEBUI_MD_DOWNLOADS_MD_DOWNLOADS_DOM_HANDLER_H_ |
| 7 | 7 |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include <set> | 10 #include <set> |
| (...skipping 20 matching lines...) Expand all Loading... |
| 31 // The handler for Javascript messages related to the "downloads" view, | 31 // The handler for Javascript messages related to the "downloads" view, |
| 32 // also observes changes to the download manager. | 32 // also observes changes to the download manager. |
| 33 class MdDownloadsDOMHandler : public content::WebUIMessageHandler { | 33 class MdDownloadsDOMHandler : public content::WebUIMessageHandler { |
| 34 public: | 34 public: |
| 35 MdDownloadsDOMHandler(content::DownloadManager* download_manager, | 35 MdDownloadsDOMHandler(content::DownloadManager* download_manager, |
| 36 content::WebUI* web_ui); | 36 content::WebUI* web_ui); |
| 37 ~MdDownloadsDOMHandler() override; | 37 ~MdDownloadsDOMHandler() override; |
| 38 | 38 |
| 39 // WebUIMessageHandler implementation. | 39 // WebUIMessageHandler implementation. |
| 40 void RegisterMessages() override; | 40 void RegisterMessages() override; |
| 41 void OnJavascriptAllowed() override; | |
| 42 void OnJavascriptDisallowed() override; | 41 void OnJavascriptDisallowed() override; |
| 43 | 42 |
| 44 // Callback for the "getDownloads" message. | 43 // Callback for the "getDownloads" message. |
| 45 void HandleGetDownloads(const base::ListValue* args); | 44 void HandleGetDownloads(const base::ListValue* args); |
| 46 | 45 |
| 47 // Callback for the "openFile" message - opens the file in the shell. | 46 // Callback for the "openFile" message - opens the file in the shell. |
| 48 void HandleOpenFile(const base::ListValue* args); | 47 void HandleOpenFile(const base::ListValue* args); |
| 49 | 48 |
| 50 // Callback for the "drag" message - initiates a file object drag. | 49 // Callback for the "drag" message - initiates a file object drag. |
| 51 void HandleDrag(const base::ListValue* args); | 50 void HandleDrag(const base::ListValue* args); |
| (...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 137 | 136 |
| 138 // IDs of downloads to remove when this handler gets deleted. | 137 // IDs of downloads to remove when this handler gets deleted. |
| 139 std::vector<IdSet> removals_; | 138 std::vector<IdSet> removals_; |
| 140 | 139 |
| 141 base::WeakPtrFactory<MdDownloadsDOMHandler> weak_ptr_factory_; | 140 base::WeakPtrFactory<MdDownloadsDOMHandler> weak_ptr_factory_; |
| 142 | 141 |
| 143 DISALLOW_COPY_AND_ASSIGN(MdDownloadsDOMHandler); | 142 DISALLOW_COPY_AND_ASSIGN(MdDownloadsDOMHandler); |
| 144 }; | 143 }; |
| 145 | 144 |
| 146 #endif // CHROME_BROWSER_UI_WEBUI_MD_DOWNLOADS_MD_DOWNLOADS_DOM_HANDLER_H_ | 145 #endif // CHROME_BROWSER_UI_WEBUI_MD_DOWNLOADS_MD_DOWNLOADS_DOM_HANDLER_H_ |
| OLD | NEW |