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

Unified Diff: chrome/browser/ui/webui/md_downloads/md_downloads_dom_handler.h

Issue 1960223002: MD Downloads: reset list tracker when renderer crashes (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: asdf 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 side-by-side diff with in-line comments
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 »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/webui/md_downloads/md_downloads_dom_handler.h
diff --git a/chrome/browser/ui/webui/md_downloads/md_downloads_dom_handler.h b/chrome/browser/ui/webui/md_downloads/md_downloads_dom_handler.h
index 1b96a54b52cb1e23af7df1801ef199aa15f8d0f9..10636211a55848c30b035f9ea252bd0b14175a4b 100644
--- a/chrome/browser/ui/webui/md_downloads/md_downloads_dom_handler.h
+++ b/chrome/browser/ui/webui/md_downloads/md_downloads_dom_handler.h
@@ -14,6 +14,7 @@
#include "base/memory/weak_ptr.h"
#include "chrome/browser/download/download_danger_prompt.h"
#include "chrome/browser/ui/webui/md_downloads/downloads_list_tracker.h"
+#include "content/public/browser/web_contents_observer.h"
#include "content/public/browser/web_ui_message_handler.h"
namespace base {
@@ -23,14 +24,14 @@ class ListValue;
namespace content {
class DownloadItem;
class DownloadManager;
-class RenderViewHost;
class WebContents;
class WebUI;
}
// The handler for Javascript messages related to the "downloads" view,
// also observes changes to the download manager.
-class MdDownloadsDOMHandler : public content::WebUIMessageHandler {
+class MdDownloadsDOMHandler : public content::WebContentsObserver,
+ public content::WebUIMessageHandler {
public:
MdDownloadsDOMHandler(content::DownloadManager* download_manager,
content::WebUI* web_ui);
@@ -40,6 +41,9 @@ class MdDownloadsDOMHandler : public content::WebUIMessageHandler {
void RegisterMessages() override;
void OnJavascriptDisallowed() override;
+ // WebContentsObserver implementation.
+ void RenderProcessGone(base::TerminationStatus status) override;
+
// Callback for the "getDownloads" message.
void HandleGetDownloads(const base::ListValue* args);
« 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