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

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

Issue 5978003: Make IPC::Channel::Listener:OnMessageReceived have a return value indicating ... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 10 years 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
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 #pragma once 7 #pragma once
8 8
9 #include "base/basictypes.h" 9 #include "base/basictypes.h"
10 #include "base/scoped_vector.h" 10 #include "base/scoped_vector.h"
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
52 virtual bool FastShutdownIfPossible(); 52 virtual bool FastShutdownIfPossible();
53 virtual bool SendWithTimeout(IPC::Message* msg, int timeout_ms); 53 virtual bool SendWithTimeout(IPC::Message* msg, int timeout_ms);
54 virtual base::ProcessHandle GetHandle(); 54 virtual base::ProcessHandle GetHandle();
55 55
56 virtual TransportDIB* GetTransportDIB(TransportDIB::Id dib_id); 56 virtual TransportDIB* GetTransportDIB(TransportDIB::Id dib_id);
57 57
58 // IPC::Channel::Sender via RenderProcessHost. 58 // IPC::Channel::Sender via RenderProcessHost.
59 virtual bool Send(IPC::Message* msg); 59 virtual bool Send(IPC::Message* msg);
60 60
61 // IPC::Channel::Listener via RenderProcessHost. 61 // IPC::Channel::Listener via RenderProcessHost.
62 virtual void OnMessageReceived(const IPC::Message& msg); 62 virtual bool OnMessageReceived(const IPC::Message& msg);
63 virtual void OnChannelConnected(int32 peer_pid); 63 virtual void OnChannelConnected(int32 peer_pid);
64 64
65 // Attaches the factory object so we can remove this object in its destructor 65 // Attaches the factory object so we can remove this object in its destructor
66 // and prevent MockRenderProcessHostFacotry from deleting it. 66 // and prevent MockRenderProcessHostFacotry from deleting it.
67 void SetFactory(const MockRenderProcessHostFactory* factory) { 67 void SetFactory(const MockRenderProcessHostFactory* factory) {
68 factory_ = factory; 68 factory_ = factory;
69 } 69 }
70 70
71 private: 71 private:
72 // Stores IPC messages that would have been sent to the renderer. 72 // Stores IPC messages that would have been sent to the renderer.
(...skipping 20 matching lines...) Expand all
93 private: 93 private:
94 // A list of MockRenderProcessHosts created by this object. This list is used 94 // A list of MockRenderProcessHosts created by this object. This list is used
95 // for deleting all MockRenderProcessHosts that have not deleted by a test in 95 // for deleting all MockRenderProcessHosts that have not deleted by a test in
96 // the destructor and prevent them from being leaked. 96 // the destructor and prevent them from being leaked.
97 mutable ScopedVector<MockRenderProcessHost> processes_; 97 mutable ScopedVector<MockRenderProcessHost> processes_;
98 98
99 DISALLOW_COPY_AND_ASSIGN(MockRenderProcessHostFactory); 99 DISALLOW_COPY_AND_ASSIGN(MockRenderProcessHostFactory);
100 }; 100 };
101 101
102 #endif // CHROME_BROWSER_RENDERER_HOST_MOCK_RENDER_PROCESS_HOST_H_ 102 #endif // CHROME_BROWSER_RENDERER_HOST_MOCK_RENDER_PROCESS_HOST_H_
OLDNEW
« no previous file with comments | « chrome/browser/renderer_host/browser_render_process_host.cc ('k') | chrome/browser/renderer_host/mock_render_process_host.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698