Index: content/browser/renderer_host/mock_render_process_host.h |
=================================================================== |
--- content/browser/renderer_host/mock_render_process_host.h (revision 110552) |
+++ content/browser/renderer_host/mock_render_process_host.h (working copy) |
@@ -8,7 +8,8 @@ |
#include "base/basictypes.h" |
#include "base/memory/scoped_vector.h" |
-#include "content/browser/renderer_host/render_process_host.h" |
+#include "content/public/browser/render_process_host.h" |
+#include "content/public/browser/render_process_host_factory.h" |
#include "ipc/ipc_test_sink.h" |
class MockRenderProcessHostFactory; |
@@ -16,7 +17,7 @@ |
// A mock render process host that has no corresponding renderer process. All |
// IPC messages are sent into the message sink for inspection by tests. |
-class MockRenderProcessHost : public RenderProcessHost { |
+class MockRenderProcessHost : public content::RenderProcessHost { |
public: |
explicit MockRenderProcessHost(content::BrowserContext* browser_context); |
virtual ~MockRenderProcessHost(); |
@@ -46,13 +47,34 @@ |
virtual void WidgetHidden() OVERRIDE; |
virtual int VisibleWidgetCount() const OVERRIDE; |
virtual void AddWord(const string16& word); |
- virtual bool FastShutdownIfPossible() OVERRIDE; |
- virtual void DumpHandles() OVERRIDE; |
- virtual base::ProcessHandle GetHandle() OVERRIDE; |
- virtual TransportDIB* GetTransportDIB(TransportDIB::Id dib_id) OVERRIDE; |
+ virtual bool FastShutdownIfPossible(); |
+ virtual bool FastShutdownStarted() const; |
+ virtual void DumpHandles(); |
+ virtual base::ProcessHandle GetHandle(); |
+ virtual TransportDIB* GetTransportDIB(TransportDIB::Id dib_id); |
virtual void SetCompositingSurface( |
int render_widget_id, |
gfx::PluginWindowHandle compositing_surface) OVERRIDE; |
+ virtual int GetID() const; |
+ virtual bool HasConnection() const; |
+ virtual void SetIgnoreInputEvents(bool ignore_input_events); |
+ virtual bool IgnoreInputEvents() const; |
+ virtual void Attach(IPC::Channel::Listener* listener, int routing_id); |
+ virtual void Release(int listener_id); |
+ virtual void Cleanup(); |
+ virtual void ReportExpectingClose(int32 listener_id); |
+ virtual void AddPendingView(); |
+ virtual void RemovePendingView(); |
+ virtual void SetSuddenTerminationAllowed(bool allowed); |
+ virtual bool SuddenTerminationAllowed() const; |
+ virtual void UpdateMaxPageID(int32 page_id); |
+ virtual IPC::Channel::Listener* GetListenerByID(int routing_id); |
+ virtual content::BrowserContext* GetBrowserContext() const; |
+ virtual IPC::ChannelProxy* GetChannel(); |
+ virtual listeners_iterator ListenersIterator(); |
+ virtual bool FastShutdownForPageCount(size_t count); |
+ virtual base::TimeDelta GetChildProcessIdleTime() const; |
+ virtual void UpdateAndSendMaxPageID(int32 page_id); |
// IPC::Channel::Sender via RenderProcessHost. |
virtual bool Send(IPC::Message* msg) OVERRIDE; |
@@ -73,16 +95,22 @@ |
TransportDIB* transport_dib_; |
int bad_msg_count_; |
const MockRenderProcessHostFactory* factory_; |
+ int id_; |
+ content::BrowserContext* browser_context_; |
+ int32 max_page_id_; |
+ IDMap<IPC::Channel::Listener> listeners_; |
+ bool fast_shutdown_started_; |
+ |
DISALLOW_COPY_AND_ASSIGN(MockRenderProcessHost); |
}; |
-class MockRenderProcessHostFactory : public RenderProcessHostFactory { |
+class MockRenderProcessHostFactory : public content::RenderProcessHostFactory { |
public: |
MockRenderProcessHostFactory(); |
virtual ~MockRenderProcessHostFactory(); |
- virtual RenderProcessHost* CreateRenderProcessHost( |
+ virtual content::RenderProcessHost* CreateRenderProcessHost( |
content::BrowserContext* browser_context) const OVERRIDE; |
// Removes the given MockRenderProcessHost from the MockRenderProcessHost list |