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

Unified Diff: chrome/browser/ui/webui/md_downloads/md_downloads_ui.cc

Issue 1428833005: MD Downloads: track downloads in C++, dispatch discrete JS updates (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: asdf Created 5 years, 1 month 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
Index: chrome/browser/ui/webui/md_downloads/md_downloads_ui.cc
diff --git a/chrome/browser/ui/webui/md_downloads/md_downloads_ui.cc b/chrome/browser/ui/webui/md_downloads/md_downloads_ui.cc
index 3e8ec98e282bdbe79140c9f3da0c35d03df805d9..95d3a4e582f41f1126a7b8db1a013ba4f64a258c 100644
--- a/chrome/browser/ui/webui/md_downloads/md_downloads_ui.cc
+++ b/chrome/browser/ui/webui/md_downloads/md_downloads_ui.cc
@@ -142,8 +142,8 @@ MdDownloadsUI::MdDownloadsUI(content::WebUI* web_ui) : WebUIController(web_ui) {
Profile* profile = Profile::FromWebUI(web_ui);
DownloadManager* dlm = BrowserContext::GetDownloadManager(profile);
- MdDownloadsDOMHandler* handler = new MdDownloadsDOMHandler(dlm);
- web_ui->AddMessageHandler(handler);
+ handler_ = new MdDownloadsDOMHandler(dlm, web_ui);
+ web_ui->AddMessageHandler(handler_);
// Set up the chrome://downloads/ source.
content::WebUIDataSource* source = CreateDownloadsUIHTMLSource(profile);
@@ -160,3 +160,8 @@ base::RefCountedMemory* MdDownloadsUI::GetFaviconResourceBytes(
return ResourceBundle::GetSharedInstance().
LoadDataResourceBytesForScale(IDR_DOWNLOADS_FAVICON, scale_factor);
}
+
+void MdDownloadsUI::RenderViewReused(
+ content::RenderViewHost* render_view_host) {
+ handler_->RenderViewReused(render_view_host);
+}

Powered by Google App Engine
This is Rietveld 408576698