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

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

Issue 1369603003: Remove 2-stage RenderWidget initialization (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@use_offscreen_contexts
Patch Set: review comments Created 5 years, 2 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_process_host.h ('k') | content/renderer/render_view_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_process_host.h" 5 #include "content/public/test/mock_render_process_host.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <utility> 8 #include <utility>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after
165 } 165 }
166 166
167 base::ProcessHandle MockRenderProcessHost::GetHandle() const { 167 base::ProcessHandle MockRenderProcessHost::GetHandle() const {
168 // Return the current-process handle for the IPC::GetFileHandleForProcess 168 // Return the current-process handle for the IPC::GetFileHandleForProcess
169 // function. 169 // function.
170 if (process_handle) 170 if (process_handle)
171 return *process_handle; 171 return *process_handle;
172 return base::GetCurrentProcessHandle(); 172 return base::GetCurrentProcessHandle();
173 } 173 }
174 174
175 bool MockRenderProcessHost::IsReady() const {
176 return false;
177 }
178
175 bool MockRenderProcessHost::Send(IPC::Message* msg) { 179 bool MockRenderProcessHost::Send(IPC::Message* msg) {
176 // Save the message in the sink. 180 // Save the message in the sink.
177 sink_.OnMessageReceived(*msg); 181 sink_.OnMessageReceived(*msg);
178 delete msg; 182 delete msg;
179 return true; 183 return true;
180 } 184 }
181 185
182 int MockRenderProcessHost::GetID() const { 186 int MockRenderProcessHost::GetID() const {
183 return id_; 187 return id_;
184 } 188 }
(...skipping 161 matching lines...) Expand 10 before | Expand all | Expand 10 after
346 for (ScopedVector<MockRenderProcessHost>::iterator it = processes_.begin(); 350 for (ScopedVector<MockRenderProcessHost>::iterator it = processes_.begin();
347 it != processes_.end(); ++it) { 351 it != processes_.end(); ++it) {
348 if (*it == host) { 352 if (*it == host) {
349 processes_.weak_erase(it); 353 processes_.weak_erase(it);
350 break; 354 break;
351 } 355 }
352 } 356 }
353 } 357 }
354 358
355 } // namespace content 359 } // namespace content
OLDNEW
« no previous file with comments | « content/public/test/mock_render_process_host.h ('k') | content/renderer/render_view_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698