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

Unified Diff: content/public/test/mock_render_process_host.h

Issue 16431010: Refactor RenderProcessHost to use IPC::Listener instead of RenderWidgetHost (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixing Windows compile error. Created 7 years, 6 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/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 09225c75aa177ff5a0e8df66db294b17b9e46ed2..54850c684c9db14ab619ad11bc5048979de838ee 100644
--- a/content/public/test/mock_render_process_host.h
+++ b/content/public/test/mock_render_process_host.h
@@ -36,6 +36,8 @@ class MockRenderProcessHost : public RenderProcessHost {
virtual void EnableSendQueue() OVERRIDE;
virtual bool Init() OVERRIDE;
virtual int GetNextRoutingID() OVERRIDE;
+ virtual void AddRoute(int32 routing_id, IPC::Listener* listener) OVERRIDE;
+ virtual void RemoveRoute(int32 routing_id) OVERRIDE;
virtual void SimulateSwapOutACK(
const ViewMsg_SwapOut_Params& params) OVERRIDE;
virtual bool WaitForBackingStoreMsg(int render_widget_id,
@@ -58,20 +60,15 @@ class MockRenderProcessHost : public RenderProcessHost {
virtual bool HasConnection() const OVERRIDE;
virtual void SetIgnoreInputEvents(bool ignore_input_events) OVERRIDE;
virtual bool IgnoreInputEvents() const OVERRIDE;
- virtual void Attach(RenderWidgetHost* host, int routing_id) OVERRIDE;
- virtual void Release(int routing_id) OVERRIDE;
virtual void Cleanup() OVERRIDE;
virtual void AddPendingView() OVERRIDE;
virtual void RemovePendingView() OVERRIDE;
virtual void SetSuddenTerminationAllowed(bool allowed) OVERRIDE;
virtual bool SuddenTerminationAllowed() const OVERRIDE;
- virtual RenderWidgetHost* GetRenderWidgetHostByID(int routing_id)
- OVERRIDE;
virtual BrowserContext* GetBrowserContext() const OVERRIDE;
virtual bool InSameStoragePartition(
StoragePartition* partition) const OVERRIDE;
virtual IPC::ChannelProxy* GetChannel() OVERRIDE;
- virtual RenderWidgetHostsIterator GetRenderWidgetHostsIterator() OVERRIDE;
virtual bool FastShutdownForPageCount(size_t count) OVERRIDE;
virtual base::TimeDelta GetChildProcessIdleTime() const OVERRIDE;
virtual void SurfaceUpdated(int32 surface_id) OVERRIDE;
@@ -90,6 +87,8 @@ class MockRenderProcessHost : public RenderProcessHost {
factory_ = factory;
}
+ int GetActiveViewCount();
+
private:
// Stores IPC messages that would have been sent to the renderer.
IPC::TestSink sink_;
@@ -100,6 +99,7 @@ class MockRenderProcessHost : public RenderProcessHost {
BrowserContext* browser_context_;
IDMap<RenderWidgetHost> render_widget_hosts_;
+ IDMap<IPC::Listener> listeners_;
bool fast_shutdown_started_;
DISALLOW_COPY_AND_ASSIGN(MockRenderProcessHost);

Powered by Google App Engine
This is Rietveld 408576698