| 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 219 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 230 #if defined(ENABLE_WEBRTC) | 230 #if defined(ENABLE_WEBRTC) |
| 231 void MockRenderProcessHost::EnableAecDump(const base::FilePath& file) { | 231 void MockRenderProcessHost::EnableAecDump(const base::FilePath& file) { |
| 232 } | 232 } |
| 233 | 233 |
| 234 void MockRenderProcessHost::DisableAecDump() { | 234 void MockRenderProcessHost::DisableAecDump() { |
| 235 } | 235 } |
| 236 | 236 |
| 237 void MockRenderProcessHost::SetWebRtcLogMessageCallback( | 237 void MockRenderProcessHost::SetWebRtcLogMessageCallback( |
| 238 base::Callback<void(const std::string&)> callback) { | 238 base::Callback<void(const std::string&)> callback) { |
| 239 } | 239 } |
| 240 | |
| 241 RenderProcessHost::WebRtcStopRtpDumpCallback | |
| 242 MockRenderProcessHost::StartRtpDump( | |
| 243 bool incoming, | |
| 244 bool outgoing, | |
| 245 const WebRtcRtpPacketCallback& packet_callback) { | |
| 246 return WebRtcStopRtpDumpCallback(); | |
| 247 } | |
| 248 #endif | 240 #endif |
| 249 | 241 |
| 250 void MockRenderProcessHost::ResumeDeferredNavigation( | 242 void MockRenderProcessHost::ResumeDeferredNavigation( |
| 251 const GlobalRequestID& request_id) {} | 243 const GlobalRequestID& request_id) {} |
| 252 | 244 |
| 253 bool MockRenderProcessHost::OnMessageReceived(const IPC::Message& msg) { | 245 bool MockRenderProcessHost::OnMessageReceived(const IPC::Message& msg) { |
| 254 IPC::Listener* listener = listeners_.Lookup(msg.routing_id()); | 246 IPC::Listener* listener = listeners_.Lookup(msg.routing_id()); |
| 255 if (listener) | 247 if (listener) |
| 256 return listener->OnMessageReceived(msg); | 248 return listener->OnMessageReceived(msg); |
| 257 return false; | 249 return false; |
| (...skipping 28 matching lines...) Expand all Loading... |
| 286 for (ScopedVector<MockRenderProcessHost>::iterator it = processes_.begin(); | 278 for (ScopedVector<MockRenderProcessHost>::iterator it = processes_.begin(); |
| 287 it != processes_.end(); ++it) { | 279 it != processes_.end(); ++it) { |
| 288 if (*it == host) { | 280 if (*it == host) { |
| 289 processes_.weak_erase(it); | 281 processes_.weak_erase(it); |
| 290 break; | 282 break; |
| 291 } | 283 } |
| 292 } | 284 } |
| 293 } | 285 } |
| 294 | 286 |
| 295 } // content | 287 } // content |
| OLD | NEW |