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 #ifndef CONTENT_PUBLIC_TEST_MOCK_RENDER_PROCESS_HOST_H_ | 5 #ifndef CONTENT_PUBLIC_TEST_MOCK_RENDER_PROCESS_HOST_H_ |
6 #define CONTENT_PUBLIC_TEST_MOCK_RENDER_PROCESS_HOST_H_ | 6 #define CONTENT_PUBLIC_TEST_MOCK_RENDER_PROCESS_HOST_H_ |
7 | 7 |
8 #include <stddef.h> | 8 #include <stddef.h> |
9 #include <stdint.h> | 9 #include <stdint.h> |
| 10 #include <utility> |
10 | 11 |
11 #include "base/macros.h" | 12 #include "base/macros.h" |
12 #include "base/memory/scoped_vector.h" | 13 #include "base/memory/scoped_vector.h" |
13 #include "base/observer_list.h" | 14 #include "base/observer_list.h" |
14 #include "content/public/browser/render_process_host.h" | 15 #include "content/public/browser/render_process_host.h" |
15 #include "content/public/browser/render_process_host_factory.h" | 16 #include "content/public/browser/render_process_host_factory.h" |
16 #include "ipc/ipc_test_sink.h" | 17 #include "ipc/ipc_test_sink.h" |
17 | 18 |
18 class StoragePartition; | 19 class StoragePartition; |
19 | 20 |
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
120 | 121 |
121 void set_is_for_guests_only(bool is_for_guests_only) { | 122 void set_is_for_guests_only(bool is_for_guests_only) { |
122 is_for_guests_only_ = is_for_guests_only; | 123 is_for_guests_only_ = is_for_guests_only; |
123 } | 124 } |
124 | 125 |
125 void set_is_process_backgrounded(bool is_process_backgrounded) { | 126 void set_is_process_backgrounded(bool is_process_backgrounded) { |
126 is_process_backgrounded_ = is_process_backgrounded; | 127 is_process_backgrounded_ = is_process_backgrounded; |
127 } | 128 } |
128 | 129 |
129 void SetProcessHandle(scoped_ptr<base::ProcessHandle> new_handle) { | 130 void SetProcessHandle(scoped_ptr<base::ProcessHandle> new_handle) { |
130 process_handle = new_handle.Pass(); | 131 process_handle = std::move(new_handle); |
131 } | 132 } |
132 | 133 |
133 void GetAudioOutputControllers( | 134 void GetAudioOutputControllers( |
134 const GetAudioOutputControllersCallback& callback) const override {} | 135 const GetAudioOutputControllersCallback& callback) const override {} |
135 | 136 |
136 int worker_ref_count() const { return worker_ref_count_; } | 137 int worker_ref_count() const { return worker_ref_count_; } |
137 | 138 |
138 private: | 139 private: |
139 // Stores IPC messages that would have been sent to the renderer. | 140 // Stores IPC messages that would have been sent to the renderer. |
140 IPC::TestSink sink_; | 141 IPC::TestSink sink_; |
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
177 // for deleting all MockRenderProcessHosts that have not deleted by a test in | 178 // for deleting all MockRenderProcessHosts that have not deleted by a test in |
178 // the destructor and prevent them from being leaked. | 179 // the destructor and prevent them from being leaked. |
179 mutable ScopedVector<MockRenderProcessHost> processes_; | 180 mutable ScopedVector<MockRenderProcessHost> processes_; |
180 | 181 |
181 DISALLOW_COPY_AND_ASSIGN(MockRenderProcessHostFactory); | 182 DISALLOW_COPY_AND_ASSIGN(MockRenderProcessHostFactory); |
182 }; | 183 }; |
183 | 184 |
184 } // namespace content | 185 } // namespace content |
185 | 186 |
186 #endif // CONTENT_PUBLIC_TEST_MOCK_RENDER_PROCESS_HOST_H_ | 187 #endif // CONTENT_PUBLIC_TEST_MOCK_RENDER_PROCESS_HOST_H_ |
OLD | NEW |