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

Unified Diff: chrome/browser/ui/webui/downloads_dom_handler.h

Issue 977473002: downloads: break downloads.js into more classes/files. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: thestig@ review Created 5 years, 9 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/resources/downloads/manager.js ('k') | chrome/browser/ui/webui/downloads_dom_handler.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/webui/downloads_dom_handler.h
diff --git a/chrome/browser/ui/webui/downloads_dom_handler.h b/chrome/browser/ui/webui/downloads_dom_handler.h
index 85fdbd8a792d3514b631a9988c94df9690134c81..f57a861a89915ab971b5d2d0107da320b8650e1d 100644
--- a/chrome/browser/ui/webui/downloads_dom_handler.h
+++ b/chrome/browser/ui/webui/downloads_dom_handler.h
@@ -96,8 +96,8 @@ class DownloadsDOMHandler : public content::WebUIMessageHandler,
// depend on WebUI. The other methods that depend on WebUI are
// RegisterMessages() and HandleDrag().
virtual content::WebContents* GetWebUIWebContents();
- virtual void CallDownloadsList(const base::ListValue& downloads);
- virtual void CallDownloadUpdated(const base::ListValue& download);
+ virtual void CallUpdateAll(const base::ListValue& list);
+ virtual void CallUpdateItem(const base::DictionaryValue& item);
// Schedules a call to SendCurrentDownloads() in the next message loop
// iteration. Protected rather than private for use in tests.
@@ -158,6 +158,9 @@ class DownloadsDOMHandler : public content::WebUIMessageHandler,
// Whether a call to SendCurrentDownloads() is currently scheduled.
bool update_scheduled_;
+ // IDs of new downloads that the page doesn't know about yet.
+ std::set<uint32> new_downloads_;
+
base::WeakPtrFactory<DownloadsDOMHandler> weak_ptr_factory_;
DISALLOW_COPY_AND_ASSIGN(DownloadsDOMHandler);
« no previous file with comments | « chrome/browser/resources/downloads/manager.js ('k') | chrome/browser/ui/webui/downloads_dom_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698