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/logging.h" | 7 #include "base/logging.h" |
8 #include "base/single_thread_task_runner.h" | 8 #include "base/single_thread_task_runner.h" |
9 #include "base/threading/thread_task_runner_handle.h" | 9 #include "base/threading/thread_task_runner_handle.h" |
10 #include "build/build_config.h" | 10 #include "build/build_config.h" |
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
85 | 85 |
86 void MockRenderThread::AddRoute(int32_t routing_id, IPC::Listener* listener) {} | 86 void MockRenderThread::AddRoute(int32_t routing_id, IPC::Listener* listener) {} |
87 | 87 |
88 void MockRenderThread::RemoveRoute(int32_t routing_id) {} | 88 void MockRenderThread::RemoveRoute(int32_t routing_id) {} |
89 | 89 |
90 int MockRenderThread::GenerateRoutingID() { | 90 int MockRenderThread::GenerateRoutingID() { |
91 NOTREACHED(); | 91 NOTREACHED(); |
92 return MSG_ROUTING_NONE; | 92 return MSG_ROUTING_NONE; |
93 } | 93 } |
94 | 94 |
| 95 void MockRenderThread::AddRoutedInterfaces( |
| 96 int32_t routing_id, |
| 97 mojom::RoutedInterfaceProvider* provider) { |
| 98 } |
| 99 |
| 100 mojom::RouteProvider* MockRenderThread::GetRemoteRouteProvider() { |
| 101 NOTREACHED(); |
| 102 return nullptr; |
| 103 } |
| 104 |
95 void MockRenderThread::AddFilter(IPC::MessageFilter* filter) { | 105 void MockRenderThread::AddFilter(IPC::MessageFilter* filter) { |
96 filter->OnFilterAdded(&sink()); | 106 filter->OnFilterAdded(&sink()); |
97 // Add this filter to a vector so the MockRenderThread::RemoveFilter function | 107 // Add this filter to a vector so the MockRenderThread::RemoveFilter function |
98 // can check if this filter is added. | 108 // can check if this filter is added. |
99 filters_.push_back(make_scoped_refptr(filter)); | 109 filters_.push_back(make_scoped_refptr(filter)); |
100 } | 110 } |
101 | 111 |
102 void MockRenderThread::RemoveFilter(IPC::MessageFilter* filter) { | 112 void MockRenderThread::RemoveFilter(IPC::MessageFilter* filter) { |
103 // Emulate the IPC::ChannelProxy::OnRemoveFilter function. | 113 // Emulate the IPC::ChannelProxy::OnRemoveFilter function. |
104 for (size_t i = 0; i < filters_.size(); ++i) { | 114 for (size_t i = 0; i < filters_.size(); ++i) { |
(...skipping 158 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
263 void MockRenderThread::OnDuplicateSection( | 273 void MockRenderThread::OnDuplicateSection( |
264 base::SharedMemoryHandle renderer_handle, | 274 base::SharedMemoryHandle renderer_handle, |
265 base::SharedMemoryHandle* browser_handle) { | 275 base::SharedMemoryHandle* browser_handle) { |
266 // We don't have to duplicate the input handles since RenderViewTest does not | 276 // We don't have to duplicate the input handles since RenderViewTest does not |
267 // separate a browser process from a renderer process. | 277 // separate a browser process from a renderer process. |
268 *browser_handle = renderer_handle; | 278 *browser_handle = renderer_handle; |
269 } | 279 } |
270 #endif // defined(OS_WIN) | 280 #endif // defined(OS_WIN) |
271 | 281 |
272 } // namespace content | 282 } // namespace content |
OLD | NEW |