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

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

Issue 10854245: In-te-grate hy-phen-ator to con-tent. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 8 years, 3 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 | Annotate | Revision Log
« no previous file with comments | « content/content_tests.gypi ('k') | content/public/test/mock_render_thread.h » ('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 "base/lazy_instance.h" 7 #include "base/lazy_instance.h"
8 #include "base/message_loop.h" 8 #include "base/message_loop.h"
9 #include "base/time.h" 9 #include "base/time.h"
10 #include "content/browser/child_process_security_policy_impl.h" 10 #include "content/browser/child_process_security_policy_impl.h"
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after
94 } 94 }
95 95
96 bool MockRenderProcessHost::FastShutdownStarted() const { 96 bool MockRenderProcessHost::FastShutdownStarted() const {
97 return fast_shutdown_started_; 97 return fast_shutdown_started_;
98 } 98 }
99 99
100 void MockRenderProcessHost::DumpHandles() { 100 void MockRenderProcessHost::DumpHandles() {
101 } 101 }
102 102
103 base::ProcessHandle MockRenderProcessHost::GetHandle() { 103 base::ProcessHandle MockRenderProcessHost::GetHandle() {
104 return base::kNullProcessHandle; 104 // Return the current-process handle for the IPC::GetFileHandleForProcess
105 // function.
106 return base::Process::Current().handle();
105 } 107 }
106 108
107 bool MockRenderProcessHost::Send(IPC::Message* msg) { 109 bool MockRenderProcessHost::Send(IPC::Message* msg) {
108 // Save the message in the sink. 110 // Save the message in the sink.
109 sink_.OnMessageReceived(*msg); 111 sink_.OnMessageReceived(*msg);
110 delete msg; 112 delete msg;
111 return true; 113 return true;
112 } 114 }
113 115
114 TransportDIB* MockRenderProcessHost::GetTransportDIB(TransportDIB::Id dib_id) { 116 TransportDIB* MockRenderProcessHost::GetTransportDIB(TransportDIB::Id dib_id) {
(...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after
248 for (ScopedVector<MockRenderProcessHost>::iterator it = processes_.begin(); 250 for (ScopedVector<MockRenderProcessHost>::iterator it = processes_.begin();
249 it != processes_.end(); ++it) { 251 it != processes_.end(); ++it) {
250 if (*it == host) { 252 if (*it == host) {
251 processes_.weak_erase(it); 253 processes_.weak_erase(it);
252 break; 254 break;
253 } 255 }
254 } 256 }
255 } 257 }
256 258
257 } // content 259 } // content
OLDNEW
« no previous file with comments | « content/content_tests.gypi ('k') | content/public/test/mock_render_thread.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698