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

Side by Side Diff: content/public/test/mock_render_thread.cc

Issue 2090773003: Add ability to bind a different InterfaceRegistry/InterfaceProvider to an incoming Connection. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: . Created 4 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
« no previous file with comments | « content/child/mojo/mojo_application.cc ('k') | content/renderer/render_frame_impl.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) 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 177 matching lines...) Expand 10 before | Expand all | Expand 10 after
188 if (!interface_registry_) 188 if (!interface_registry_)
189 interface_registry_.reset(new shell::InterfaceRegistry(nullptr)); 189 interface_registry_.reset(new shell::InterfaceRegistry(nullptr));
190 return interface_registry_.get(); 190 return interface_registry_.get();
191 } 191 }
192 192
193 shell::InterfaceProvider* MockRenderThread::GetRemoteInterfaces() { 193 shell::InterfaceProvider* MockRenderThread::GetRemoteInterfaces() {
194 if (!remote_interfaces_) { 194 if (!remote_interfaces_) {
195 shell::mojom::InterfaceProviderPtr remote_interface_provider; 195 shell::mojom::InterfaceProviderPtr remote_interface_provider;
196 pending_remote_interface_provider_request_ = 196 pending_remote_interface_provider_request_ =
197 GetProxy(&remote_interface_provider); 197 GetProxy(&remote_interface_provider);
198 remote_interfaces_.reset(new shell::InterfaceProvider( 198 remote_interfaces_.reset(new shell::InterfaceProvider);
199 std::move(remote_interface_provider))); 199 remote_interfaces_->Bind(std::move(remote_interface_provider));
200 } 200 }
201 return remote_interfaces_.get(); 201 return remote_interfaces_.get();
202 } 202 }
203 203
204 void MockRenderThread::SendCloseMessage() { 204 void MockRenderThread::SendCloseMessage() {
205 ViewMsg_Close msg(routing_id_); 205 ViewMsg_Close msg(routing_id_);
206 RenderViewImpl::FromRoutingID(routing_id_)->OnMessageReceived(msg); 206 RenderViewImpl::FromRoutingID(routing_id_)->OnMessageReceived(msg);
207 } 207 }
208 208
209 // The Widget expects to be returned valid route_id. 209 // The Widget expects to be returned valid route_id.
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
259 void MockRenderThread::OnDuplicateSection( 259 void MockRenderThread::OnDuplicateSection(
260 base::SharedMemoryHandle renderer_handle, 260 base::SharedMemoryHandle renderer_handle,
261 base::SharedMemoryHandle* browser_handle) { 261 base::SharedMemoryHandle* browser_handle) {
262 // We don't have to duplicate the input handles since RenderViewTest does not 262 // We don't have to duplicate the input handles since RenderViewTest does not
263 // separate a browser process from a renderer process. 263 // separate a browser process from a renderer process.
264 *browser_handle = renderer_handle; 264 *browser_handle = renderer_handle;
265 } 265 }
266 #endif // defined(OS_WIN) 266 #endif // defined(OS_WIN)
267 267
268 } // namespace content 268 } // namespace content
OLDNEW
« no previous file with comments | « content/child/mojo/mojo_application.cc ('k') | content/renderer/render_frame_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698