diff options
author | phajdan.jr@chromium.org <phajdan.jr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-02-28 22:00:40 +0000 |
---|---|---|
committer | phajdan.jr@chromium.org <phajdan.jr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-02-28 22:00:40 +0000 |
commit | f4eaf7b97ff394ed43b4dcfbc3d0fc5742a42c0c (patch) | |
tree | ec7d838aac13db04e76e066b43cd217d90600260 /content/browser/browser_child_process_host_impl.h | |
parent | 82219ddbdcd14c65e9bc4b99e63ee02084caa772 (diff) | |
download | chromium_src-f4eaf7b97ff394ed43b4dcfbc3d0fc5742a42c0c.zip chromium_src-f4eaf7b97ff394ed43b4dcfbc3d0fc5742a42c0c.tar.gz chromium_src-f4eaf7b97ff394ed43b4dcfbc3d0fc5742a42c0c.tar.bz2 |
content: convert child process notifications to observer usage
BUG=170921
Review URL: https://codereview.chromium.org/12212089
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@185337 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content/browser/browser_child_process_host_impl.h')
-rw-r--r-- | content/browser/browser_child_process_host_impl.h | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/content/browser/browser_child_process_host_impl.h b/content/browser/browser_child_process_host_impl.h index efbf78e..5ecaddaa 100644 --- a/content/browser/browser_child_process_host_impl.h +++ b/content/browser/browser_child_process_host_impl.h @@ -16,7 +16,9 @@ #include "content/public/common/child_process_host_delegate.h" namespace content { + class BrowserChildProcessHostIterator; +class BrowserChildProcessObserver; // Plugins/workers and other child processes that live on the IO thread use this // class. RenderProcessHostImpl is the main exception that doesn't use this @@ -62,18 +64,21 @@ class CONTENT_EXPORT BrowserChildProcessHostImpl // shutdown. Default is to always terminate. void SetTerminateChildOnShutdown(bool terminate_on_shutdown); - // Sends the given notification on the UI thread. - void Notify(int type); + // Called when an instance of a particular child is created in a page. + static void NotifyProcessInstanceCreated(const ChildProcessData& data); - BrowserChildProcessHostDelegate* delegate() const { return delegate_; - } + BrowserChildProcessHostDelegate* delegate() const { return delegate_; } typedef std::list<BrowserChildProcessHostImpl*> BrowserChildProcessList; private: friend class BrowserChildProcessHostIterator; + friend class BrowserChildProcessObserver; static BrowserChildProcessList* GetIterator(); + static void AddObserver(BrowserChildProcessObserver* observer); + static void RemoveObserver(BrowserChildProcessObserver* observer); + // ChildProcessHostDelegate implementation: virtual bool CanShutdown() OVERRIDE; virtual void OnChildDisconnected() OVERRIDE; |