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

Side by Side Diff: chrome/browser/renderer_host/mock_render_process_host.h

Issue 18432: Factor out the test web contents from the WebContents unit test so that it ca... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 11 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 | « no previous file | chrome/browser/renderer_host/mock_render_process_host.cc » ('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) 2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2009 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 CHROME_BROWSER_RENDERER_HOST_MOCK_RENDER_PROCESS_HOST_H_ 5 #ifndef CHROME_BROWSER_RENDERER_HOST_MOCK_RENDER_PROCESS_HOST_H_
6 #define CHROME_BROWSER_RENDERER_HOST_MOCK_RENDER_PROCESS_HOST_H_ 6 #define CHROME_BROWSER_RENDERER_HOST_MOCK_RENDER_PROCESS_HOST_H_
7 7
8 #include "base/basictypes.h" 8 #include "base/basictypes.h"
9 #include "chrome/browser/renderer_host/render_process_host.h" 9 #include "chrome/browser/renderer_host/render_process_host.h"
10 #include "chrome/common/ipc_test_sink.h" 10 #include "chrome/common/ipc_test_sink.h"
(...skipping 26 matching lines...) Expand all
37 virtual bool FastShutdownIfPossible(); 37 virtual bool FastShutdownIfPossible();
38 38
39 // IPC::Channel::Sender via RenderProcessHost. 39 // IPC::Channel::Sender via RenderProcessHost.
40 virtual bool Send(IPC::Message* msg); 40 virtual bool Send(IPC::Message* msg);
41 41
42 // IPC::Channel::Listener via RenderProcessHost. 42 // IPC::Channel::Listener via RenderProcessHost.
43 virtual void OnMessageReceived(const IPC::Message& msg); 43 virtual void OnMessageReceived(const IPC::Message& msg);
44 virtual void OnChannelConnected(int32 peer_pid); 44 virtual void OnChannelConnected(int32 peer_pid);
45 45
46 private: 46 private:
47 // RenderProcessHost implementation (protected portion).
48 virtual void Unregister();
49
50 // Stores IPC messages that would have been sent to the renderer. 47 // Stores IPC messages that would have been sent to the renderer.
51 IPC::TestSink sink_; 48 IPC::TestSink sink_;
52 49
53 DISALLOW_COPY_AND_ASSIGN(MockRenderProcessHost); 50 DISALLOW_COPY_AND_ASSIGN(MockRenderProcessHost);
54 }; 51 };
55 52
53 class MockRenderProcessHostFactory : public RenderProcessHostFactory {
54 public:
55 virtual ~MockRenderProcessHostFactory() {}
56 virtual RenderProcessHost* CreateRenderProcessHost(
57 Profile* profile) const {
58 return new MockRenderProcessHost(profile);
59 }
60 };
61
56 #endif // CHROME_BROWSER_RENDERER_HOST_MOCK_RENDER_PROCESS_HOST_H_ 62 #endif // CHROME_BROWSER_RENDERER_HOST_MOCK_RENDER_PROCESS_HOST_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/renderer_host/mock_render_process_host.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698