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..2f1040aaa9647f5a2fd25719597d2b89178547a1 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; |
@@ -183,6 +186,9 @@ class CONTENT_EXPORT RenderProcessHostImpl |
static base::MessageLoop* GetInProcessRendererThreadForTesting(); |
+ // This forces a renderer that is running "in process" to shut down. |
+ static void ShutDownInProcessRenderer(); |
+ |
#if defined(OS_ANDROID) |
const scoped_refptr<BrowserDemuxerAndroid>& browser_demuxer_android() { |
return browser_demuxer_android_; |
@@ -204,6 +210,11 @@ class CONTENT_EXPORT RenderProcessHostImpl |
// True if we've posted a DeleteTask and will be deleted soon. |
bool deleting_soon_; |
+#ifndef NDEBUG |
+ // True if this object has deleted itself. |
+ bool is_self_deleted_; |
+#endif |
+ |
// The count of currently swapped out but pending RenderViews. We have |
// started to swap these in, so the renderer process should not exit if |
// this count is non-zero. |
@@ -307,6 +318,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 |