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

Unified Diff: content/browser/renderer_host/render_process_host_impl.h

Issue 72203003: Introduce RenderProcessHostObserver, use it in its first client. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fixed Created 7 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: content/browser/renderer_host/render_process_host_impl.h
diff --git a/content/browser/renderer_host/render_process_host_impl.h b/content/browser/renderer_host/render_process_host_impl.h
index 681d3295cf3bf9f828414d0d1f63df157ddb4e64..98e04b30eef3109dfec0d302ba3bd558f9bd3d84 100644
--- a/content/browser/renderer_host/render_process_host_impl.h
+++ b/content/browser/renderer_host/render_process_host_impl.h
@@ -10,6 +10,7 @@
#include <string>
#include "base/memory/scoped_ptr.h"
+#include "base/observer_list.h"
#include "base/process/process.h"
#include "base/timer/timer.h"
#include "content/browser/child_process_launcher.h"
@@ -82,6 +83,8 @@ class CONTENT_EXPORT RenderProcessHostImpl
virtual int GetNextRoutingID() OVERRIDE;
virtual void AddRoute(int32 routing_id, IPC::Listener* listener) OVERRIDE;
virtual void RemoveRoute(int32 routing_id) OVERRIDE;
+ virtual void AddObserver(RenderProcessHostObserver* observer) OVERRIDE;
+ virtual void RemoveObserver(RenderProcessHostObserver* observer) OVERRIDE;
virtual bool WaitForBackingStoreMsg(int render_widget_id,
const base::TimeDelta& max_delay,
IPC::Message* msg) OVERRIDE;
@@ -307,6 +310,9 @@ class CONTENT_EXPORT RenderProcessHostImpl
// Owned by |browser_context_|.
StoragePartitionImpl* storage_partition_impl_;
+ // The observers watching our lifetime.
+ ObserverList<RenderProcessHostObserver> observers_;
+
// True if the process can be shut down suddenly. If this is true, then we're
// sure that all the RenderViews in the process can be shutdown suddenly. If
// it's false, then specific RenderViews might still be allowed to be shutdown
« no previous file with comments | « no previous file | content/browser/renderer_host/render_process_host_impl.cc » ('j') | content/browser/site_instance_impl.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698