| 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 RenderViewReused() override; | 41 void OnJavascriptAllowed() override; |
| 42 void OnJavascriptDisallowed() override; |
| 42 | 43 |
| 43 // Callback for the "getDownloads" message. | 44 // Callback for the "getDownloads" message. |
| 44 void HandleGetDownloads(const base::ListValue* args); | 45 void HandleGetDownloads(const base::ListValue* args); |
| 45 | 46 |
| 46 // Callback for the "openFile" message - opens the file in the shell. | 47 // Callback for the "openFile" message - opens the file in the shell. |
| 47 void HandleOpenFile(const base::ListValue* args); | 48 void HandleOpenFile(const base::ListValue* args); |
| 48 | 49 |
| 49 // Callback for the "drag" message - initiates a file object drag. | 50 // Callback for the "drag" message - initiates a file object drag. |
| 50 void HandleDrag(const base::ListValue* args); | 51 void HandleDrag(const base::ListValue* args); |
| 51 | 52 |
| (...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 136 | 137 |
| 137 // IDs of downloads to remove when this handler gets deleted. | 138 // IDs of downloads to remove when this handler gets deleted. |
| 138 std::vector<IdSet> removals_; | 139 std::vector<IdSet> removals_; |
| 139 | 140 |
| 140 base::WeakPtrFactory<MdDownloadsDOMHandler> weak_ptr_factory_; | 141 base::WeakPtrFactory<MdDownloadsDOMHandler> weak_ptr_factory_; |
| 141 | 142 |
| 142 DISALLOW_COPY_AND_ASSIGN(MdDownloadsDOMHandler); | 143 DISALLOW_COPY_AND_ASSIGN(MdDownloadsDOMHandler); |
| 143 }; | 144 }; |
| 144 | 145 |
| 145 #endif // CHROME_BROWSER_UI_WEBUI_MD_DOWNLOADS_MD_DOWNLOADS_DOM_HANDLER_H_ | 146 #endif // CHROME_BROWSER_UI_WEBUI_MD_DOWNLOADS_MD_DOWNLOADS_DOM_HANDLER_H_ |
| OLD | NEW |