| 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_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/message_loop.h" | 8 #include "base/message_loop/message_loop.h" |
| 9 #include "base/time/time.h" | 9 #include "base/time/time.h" |
| 10 #include "content/browser/child_process_security_policy_impl.h" | 10 #include "content/browser/child_process_security_policy_impl.h" |
| (...skipping 239 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 250 void MockRenderProcessHost::FilterURL(bool empty_allowed, GURL* url) { | 250 void MockRenderProcessHost::FilterURL(bool empty_allowed, GURL* url) { |
| 251 RenderProcessHostImpl::FilterURL(this, empty_allowed, url); | 251 RenderProcessHostImpl::FilterURL(this, empty_allowed, url); |
| 252 } | 252 } |
| 253 | 253 |
| 254 #if defined(ENABLE_WEBRTC) | 254 #if defined(ENABLE_WEBRTC) |
| 255 void MockRenderProcessHost::EnableAecDump(const base::FilePath& file) { | 255 void MockRenderProcessHost::EnableAecDump(const base::FilePath& file) { |
| 256 } | 256 } |
| 257 | 257 |
| 258 void MockRenderProcessHost::DisableAecDump() { | 258 void MockRenderProcessHost::DisableAecDump() { |
| 259 } | 259 } |
| 260 |
| 261 void MockRenderProcessHost::SetWebRtcLogMessageCallback( |
| 262 base::Callback<void(const std::string&)> callback) { |
| 263 } |
| 260 #endif | 264 #endif |
| 261 | 265 |
| 262 bool MockRenderProcessHost::OnMessageReceived(const IPC::Message& msg) { | 266 bool MockRenderProcessHost::OnMessageReceived(const IPC::Message& msg) { |
| 263 IPC::Listener* listener = listeners_.Lookup(msg.routing_id()); | 267 IPC::Listener* listener = listeners_.Lookup(msg.routing_id()); |
| 264 if (listener) | 268 if (listener) |
| 265 return listener->OnMessageReceived(msg); | 269 return listener->OnMessageReceived(msg); |
| 266 return false; | 270 return false; |
| 267 } | 271 } |
| 268 | 272 |
| 269 void MockRenderProcessHost::OnChannelConnected(int32 peer_pid) { | 273 void MockRenderProcessHost::OnChannelConnected(int32 peer_pid) { |
| (...skipping 25 matching lines...) Expand all Loading... |
| 295 for (ScopedVector<MockRenderProcessHost>::iterator it = processes_.begin(); | 299 for (ScopedVector<MockRenderProcessHost>::iterator it = processes_.begin(); |
| 296 it != processes_.end(); ++it) { | 300 it != processes_.end(); ++it) { |
| 297 if (*it == host) { | 301 if (*it == host) { |
| 298 processes_.weak_erase(it); | 302 processes_.weak_erase(it); |
| 299 break; | 303 break; |
| 300 } | 304 } |
| 301 } | 305 } |
| 302 } | 306 } |
| 303 | 307 |
| 304 } // content | 308 } // content |
| OLD | NEW |