Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(13)

Side by Side Diff: chrome/browser/ui/webui/md_downloads/md_downloads_dom_handler.h

Issue 1938983003: WebUI: Update Downloads to fix bug introduced by JS lifecycle controls. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | chrome/browser/ui/webui/md_downloads/md_downloads_dom_handler.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/ui/webui/md_downloads/md_downloads_dom_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698