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

Unified Diff: content/browser/browser_child_process_host_impl.h

Issue 12212089: content: convert child process notifications to observer usage (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: private Created 7 years, 10 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
Index: content/browser/browser_child_process_host_impl.h
diff --git a/content/browser/browser_child_process_host_impl.h b/content/browser/browser_child_process_host_impl.h
index efbf78ed024d20dac8ebded2b3716d07cf180df3..5ecaddaaa25fac1e5138cae6ada0ca0b6cbd368a 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;

Powered by Google App Engine
This is Rietveld 408576698