OLD | NEW |
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 #include "content/public/test/mock_render_thread.h" | 5 #include "content/public/test/mock_render_thread.h" |
6 | 6 |
7 #include "base/process_util.h" | 7 #include "base/process_util.h" |
8 #include "content/common/view_messages.h" | 8 #include "content/common/view_messages.h" |
9 #include "ipc/ipc_message_utils.h" | 9 #include "ipc/ipc_message_utils.h" |
10 #include "ipc/ipc_sync_message.h" | 10 #include "ipc/ipc_sync_message.h" |
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
69 | 69 |
70 IPC::SyncMessageFilter* MockRenderThread::GetSyncMessageFilter() { | 70 IPC::SyncMessageFilter* MockRenderThread::GetSyncMessageFilter() { |
71 return NULL; | 71 return NULL; |
72 } | 72 } |
73 | 73 |
74 scoped_refptr<base::MessageLoopProxy> | 74 scoped_refptr<base::MessageLoopProxy> |
75 MockRenderThread::GetIOMessageLoopProxy() { | 75 MockRenderThread::GetIOMessageLoopProxy() { |
76 return scoped_refptr<base::MessageLoopProxy>(); | 76 return scoped_refptr<base::MessageLoopProxy>(); |
77 } | 77 } |
78 | 78 |
79 void MockRenderThread::AddRoute(int32 routing_id, | 79 void MockRenderThread::AddRoute(int32 routing_id, IPC::Listener* listener) { |
80 IPC::Channel::Listener* listener) { | |
81 // We may hear this for views created from OnMsgCreateWindow as well, | 80 // We may hear this for views created from OnMsgCreateWindow as well, |
82 // in which case we don't want to track the new widget. | 81 // in which case we don't want to track the new widget. |
83 if (routing_id_ == routing_id) | 82 if (routing_id_ == routing_id) |
84 widget_ = listener; | 83 widget_ = listener; |
85 } | 84 } |
86 | 85 |
87 void MockRenderThread::RemoveRoute(int32 routing_id) { | 86 void MockRenderThread::RemoveRoute(int32 routing_id) { |
88 // We may hear this for views created from OnMsgCreateWindow as well, | 87 // We may hear this for views created from OnMsgCreateWindow as well, |
89 // in which case we don't want to track the new widget. | 88 // in which case we don't want to track the new widget. |
90 if (routing_id_ == routing_id) | 89 if (routing_id_ == routing_id) |
(...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
218 void MockRenderThread::OnDuplicateSection( | 217 void MockRenderThread::OnDuplicateSection( |
219 base::SharedMemoryHandle renderer_handle, | 218 base::SharedMemoryHandle renderer_handle, |
220 base::SharedMemoryHandle* browser_handle) { | 219 base::SharedMemoryHandle* browser_handle) { |
221 // We don't have to duplicate the input handles since RenderViewTest does not | 220 // We don't have to duplicate the input handles since RenderViewTest does not |
222 // separate a browser process from a renderer process. | 221 // separate a browser process from a renderer process. |
223 *browser_handle = renderer_handle; | 222 *browser_handle = renderer_handle; |
224 } | 223 } |
225 #endif // defined(OS_WIN) | 224 #endif // defined(OS_WIN) |
226 | 225 |
227 } // namespace content | 226 } // namespace content |
OLD | NEW |