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/process/process_handle.h" | 9 #include "base/process/process_handle.h" |
10 #include "base/time/time.h" | 10 #include "base/time/time.h" |
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
107 void MockRenderProcessHost::AddWord(const base::string16& word) { | 107 void MockRenderProcessHost::AddWord(const base::string16& word) { |
108 } | 108 } |
109 | 109 |
110 bool MockRenderProcessHost::FastShutdownIfPossible() { | 110 bool MockRenderProcessHost::FastShutdownIfPossible() { |
111 // We aren't actually going to do anything, but set |fast_shutdown_started_| | 111 // We aren't actually going to do anything, but set |fast_shutdown_started_| |
112 // to true so that tests know we've been called. | 112 // to true so that tests know we've been called. |
113 fast_shutdown_started_ = true; | 113 fast_shutdown_started_ = true; |
114 return true; | 114 return true; |
115 } | 115 } |
116 | 116 |
| 117 bool MockRenderProcessHost::FastShutdown(int exit_code, bool wait) { |
| 118 return true; |
| 119 } |
| 120 |
117 bool MockRenderProcessHost::FastShutdownStarted() const { | 121 bool MockRenderProcessHost::FastShutdownStarted() const { |
118 return fast_shutdown_started_; | 122 return fast_shutdown_started_; |
119 } | 123 } |
120 | 124 |
121 void MockRenderProcessHost::DumpHandles() { | 125 void MockRenderProcessHost::DumpHandles() { |
122 } | 126 } |
123 | 127 |
124 base::ProcessHandle MockRenderProcessHost::GetHandle() const { | 128 base::ProcessHandle MockRenderProcessHost::GetHandle() const { |
125 // Return the current-process handle for the IPC::GetFileHandleForProcess | 129 // Return the current-process handle for the IPC::GetFileHandleForProcess |
126 // function. | 130 // function. |
(...skipping 166 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
293 for (ScopedVector<MockRenderProcessHost>::iterator it = processes_.begin(); | 297 for (ScopedVector<MockRenderProcessHost>::iterator it = processes_.begin(); |
294 it != processes_.end(); ++it) { | 298 it != processes_.end(); ++it) { |
295 if (*it == host) { | 299 if (*it == host) { |
296 processes_.weak_erase(it); | 300 processes_.weak_erase(it); |
297 break; | 301 break; |
298 } | 302 } |
299 } | 303 } |
300 } | 304 } |
301 | 305 |
302 } // content | 306 } // content |
OLD | NEW |