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

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

Issue 2096643002: Eliminate MojoApplicationHost (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@mah3
Patch Set: . Created 4 years, 5 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/public/test/mock_render_thread.h ('k') | content/renderer/mus/BUILD.gn » ('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 166 matching lines...) Expand 10 before | Expand all | Expand 10 after
177 177
178 #if defined(OS_WIN) 178 #if defined(OS_WIN)
179 void MockRenderThread::PreCacheFont(const LOGFONT& log_font) { 179 void MockRenderThread::PreCacheFont(const LOGFONT& log_font) {
180 } 180 }
181 181
182 void MockRenderThread::ReleaseCachedFonts() { 182 void MockRenderThread::ReleaseCachedFonts() {
183 } 183 }
184 184
185 #endif // OS_WIN 185 #endif // OS_WIN
186 186
187 MojoShellConnection* MockRenderThread::GetMojoShellConnection() {
188 return nullptr;
189 }
190
187 shell::InterfaceRegistry* MockRenderThread::GetInterfaceRegistry() { 191 shell::InterfaceRegistry* MockRenderThread::GetInterfaceRegistry() {
188 if (!interface_registry_) 192 if (!interface_registry_)
189 interface_registry_.reset(new shell::InterfaceRegistry(nullptr)); 193 interface_registry_.reset(new shell::InterfaceRegistry(nullptr));
190 return interface_registry_.get(); 194 return interface_registry_.get();
191 } 195 }
192 196
193 shell::InterfaceProvider* MockRenderThread::GetRemoteInterfaces() { 197 shell::InterfaceProvider* MockRenderThread::GetRemoteInterfaces() {
194 if (!remote_interfaces_) { 198 if (!remote_interfaces_) {
195 shell::mojom::InterfaceProviderPtr remote_interface_provider; 199 shell::mojom::InterfaceProviderPtr remote_interface_provider;
196 pending_remote_interface_provider_request_ = 200 pending_remote_interface_provider_request_ =
197 GetProxy(&remote_interface_provider); 201 GetProxy(&remote_interface_provider);
198 remote_interfaces_.reset(new shell::InterfaceProvider( 202 remote_interfaces_.reset(new shell::InterfaceProvider);
199 std::move(remote_interface_provider))); 203 remote_interfaces_->Bind(std::move(remote_interface_provider));
200 } 204 }
201 return remote_interfaces_.get(); 205 return remote_interfaces_.get();
202 } 206 }
203 207
204 void MockRenderThread::SendCloseMessage() { 208 void MockRenderThread::SendCloseMessage() {
205 ViewMsg_Close msg(routing_id_); 209 ViewMsg_Close msg(routing_id_);
206 RenderViewImpl::FromRoutingID(routing_id_)->OnMessageReceived(msg); 210 RenderViewImpl::FromRoutingID(routing_id_)->OnMessageReceived(msg);
207 } 211 }
208 212
209 // The Widget expects to be returned valid route_id. 213 // 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( 263 void MockRenderThread::OnDuplicateSection(
260 base::SharedMemoryHandle renderer_handle, 264 base::SharedMemoryHandle renderer_handle,
261 base::SharedMemoryHandle* browser_handle) { 265 base::SharedMemoryHandle* browser_handle) {
262 // We don't have to duplicate the input handles since RenderViewTest does not 266 // We don't have to duplicate the input handles since RenderViewTest does not
263 // separate a browser process from a renderer process. 267 // separate a browser process from a renderer process.
264 *browser_handle = renderer_handle; 268 *browser_handle = renderer_handle;
265 } 269 }
266 #endif // defined(OS_WIN) 270 #endif // defined(OS_WIN)
267 271
268 } // namespace content 272 } // namespace content
OLDNEW
« no previous file with comments | « content/public/test/mock_render_thread.h ('k') | content/renderer/mus/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698