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

Unified Diff: content/public/browser/render_process_host.h

Issue 72203003: Introduce RenderProcessHostObserver, use it in its first client. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix 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
« no previous file with comments | « content/content_browser.gypi ('k') | content/public/browser/render_process_host_observer.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/public/browser/render_process_host.h
diff --git a/content/public/browser/render_process_host.h b/content/public/browser/render_process_host.h
index 3aedc59ed4b8dc722dfb483e70cc3d722e03688c..765582548711909e76d308fba161a51804583d70 100644
--- a/content/public/browser/render_process_host.h
+++ b/content/public/browser/render_process_host.h
@@ -26,6 +26,7 @@ class TimeDelta;
namespace content {
class BrowserContext;
class BrowserMessageFilter;
+class RenderProcessHostObserver;
class RenderWidgetHost;
class StoragePartition;
@@ -55,6 +56,8 @@ class CONTENT_EXPORT RenderProcessHost : public IPC::Sender,
int exit_code;
};
+ // General functions ---------------------------------------------------------
+
virtual ~RenderProcessHost() {}
// Initialize the new renderer process, returning true on success. This must
@@ -73,6 +76,12 @@ class CONTENT_EXPORT RenderProcessHost : public IPC::Sender,
virtual void AddRoute(int32 routing_id, IPC::Listener* listener) = 0;
virtual void RemoveRoute(int32 routing_id) = 0;
+ // Add and remove observers for lifecycle events. The order in which
+ // notifications are sent to observers is undefined. Observers must be sure to
+ // remove the observer before they go away.
+ virtual void AddObserver(RenderProcessHostObserver* observer) = 0;
+ virtual void RemoveObserver(RenderProcessHostObserver* observer) = 0;
+
// Called to wait for the next UpdateRect message for the specified render
// widget. Returns true if successful, and the msg out-param will contain a
// copy of the received UpdateRect message.
« no previous file with comments | « content/content_browser.gypi ('k') | content/public/browser/render_process_host_observer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698