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

Side by Side Diff: content/public/test/mock_render_process_host.h

Issue 10541065: Separate out IPC::Message::Sender and channel::Listener into a separate class. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: de-inline Created 8 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « content/public/browser/render_widget_host.h ('k') | ipc/ipc.gypi » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CONTENT_PUBLIC_TEST_MOCK_RENDER_PROCESS_HOST_H_ 5 #ifndef CONTENT_PUBLIC_TEST_MOCK_RENDER_PROCESS_HOST_H_
6 #define CONTENT_PUBLIC_TEST_MOCK_RENDER_PROCESS_HOST_H_ 6 #define CONTENT_PUBLIC_TEST_MOCK_RENDER_PROCESS_HOST_H_
7 #pragma once 7 #pragma once
8 8
9 #include "base/basictypes.h" 9 #include "base/basictypes.h"
10 #include "base/memory/scoped_vector.h" 10 #include "base/memory/scoped_vector.h"
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
65 virtual bool SuddenTerminationAllowed() const OVERRIDE; 65 virtual bool SuddenTerminationAllowed() const OVERRIDE;
66 virtual RenderWidgetHost* GetRenderWidgetHostByID(int routing_id) 66 virtual RenderWidgetHost* GetRenderWidgetHostByID(int routing_id)
67 OVERRIDE; 67 OVERRIDE;
68 virtual BrowserContext* GetBrowserContext() const OVERRIDE; 68 virtual BrowserContext* GetBrowserContext() const OVERRIDE;
69 virtual IPC::ChannelProxy* GetChannel() OVERRIDE; 69 virtual IPC::ChannelProxy* GetChannel() OVERRIDE;
70 virtual RenderWidgetHostsIterator GetRenderWidgetHostsIterator() OVERRIDE; 70 virtual RenderWidgetHostsIterator GetRenderWidgetHostsIterator() OVERRIDE;
71 virtual bool FastShutdownForPageCount(size_t count) OVERRIDE; 71 virtual bool FastShutdownForPageCount(size_t count) OVERRIDE;
72 virtual base::TimeDelta GetChildProcessIdleTime() const OVERRIDE; 72 virtual base::TimeDelta GetChildProcessIdleTime() const OVERRIDE;
73 virtual void SurfaceUpdated(int32 surface_id) OVERRIDE; 73 virtual void SurfaceUpdated(int32 surface_id) OVERRIDE;
74 74
75 // IPC::Channel::Sender via RenderProcessHost. 75 // IPC::Sender via RenderProcessHost.
76 virtual bool Send(IPC::Message* msg) OVERRIDE; 76 virtual bool Send(IPC::Message* msg) OVERRIDE;
77 77
78 // IPC::Channel::Listener via RenderProcessHost. 78 // IPC::Listener via RenderProcessHost.
79 virtual bool OnMessageReceived(const IPC::Message& msg) OVERRIDE; 79 virtual bool OnMessageReceived(const IPC::Message& msg) OVERRIDE;
80 virtual void OnChannelConnected(int32 peer_pid) OVERRIDE; 80 virtual void OnChannelConnected(int32 peer_pid) OVERRIDE;
81 81
82 // Attaches the factory object so we can remove this object in its destructor 82 // Attaches the factory object so we can remove this object in its destructor
83 // and prevent MockRenderProcessHostFacotry from deleting it. 83 // and prevent MockRenderProcessHostFacotry from deleting it.
84 void SetFactory(const MockRenderProcessHostFactory* factory) { 84 void SetFactory(const MockRenderProcessHostFactory* factory) {
85 factory_ = factory; 85 factory_ = factory;
86 } 86 }
87 87
88 private: 88 private:
(...skipping 29 matching lines...) Expand all
118 // for deleting all MockRenderProcessHosts that have not deleted by a test in 118 // for deleting all MockRenderProcessHosts that have not deleted by a test in
119 // the destructor and prevent them from being leaked. 119 // the destructor and prevent them from being leaked.
120 mutable ScopedVector<MockRenderProcessHost> processes_; 120 mutable ScopedVector<MockRenderProcessHost> processes_;
121 121
122 DISALLOW_COPY_AND_ASSIGN(MockRenderProcessHostFactory); 122 DISALLOW_COPY_AND_ASSIGN(MockRenderProcessHostFactory);
123 }; 123 };
124 124
125 } // namespace content 125 } // namespace content
126 126
127 #endif // CONTENT_PUBLIC_TEST_MOCK_RENDER_PROCESS_HOST_H_ 127 #endif // CONTENT_PUBLIC_TEST_MOCK_RENDER_PROCESS_HOST_H_
OLDNEW
« no previous file with comments | « content/public/browser/render_widget_host.h ('k') | ipc/ipc.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698