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

Unified Diff: content/public/test/mock_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
Index: content/public/test/mock_render_process_host.h
diff --git a/content/public/test/mock_render_process_host.h b/content/public/test/mock_render_process_host.h
index a11473ad48c90d49304813324bb4dcfd9a179445..3836ff5d30fa616e5a645f100f841dc79e285674 100644
--- a/content/public/test/mock_render_process_host.h
+++ b/content/public/test/mock_render_process_host.h
@@ -7,6 +7,7 @@
#include "base/basictypes.h"
#include "base/memory/scoped_vector.h"
+#include "base/observer_list.h"
#include "content/public/browser/render_process_host.h"
#include "content/public/browser/render_process_host_factory.h"
#include "ipc/ipc_test_sink.h"
@@ -38,6 +39,8 @@ class MockRenderProcessHost : public RenderProcessHost {
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;
@@ -96,11 +99,13 @@ class MockRenderProcessHost : public RenderProcessHost {
const MockRenderProcessHostFactory* factory_;
int id_;
BrowserContext* browser_context_;
+ ObserverList<RenderProcessHostObserver> observers_;
IDMap<RenderWidgetHost> render_widget_hosts_;
int prev_routing_id_;
IDMap<IPC::Listener> listeners_;
bool fast_shutdown_started_;
+ bool deletion_callback_called_;
DISALLOW_COPY_AND_ASSIGN(MockRenderProcessHost);
};
« no previous file with comments | « content/public/browser/render_process_host_observer.h ('k') | content/public/test/mock_render_process_host.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698