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 <memory> | 10 #include <memory> |
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
121 void ForceReleaseWorkerRefCounts() override; | 121 void ForceReleaseWorkerRefCounts() override; |
122 bool IsWorkerRefCountDisabled() override; | 122 bool IsWorkerRefCountDisabled() override; |
123 void PurgeAndSuspend() override; | 123 void PurgeAndSuspend() override; |
124 void Resume() override; | 124 void Resume() override; |
125 mojom::Renderer* GetRendererInterface() override; | 125 mojom::Renderer* GetRendererInterface() override; |
126 resource_coordinator::ResourceCoordinatorInterface* | 126 resource_coordinator::ResourceCoordinatorInterface* |
127 GetProcessResourceCoordinator() override; | 127 GetProcessResourceCoordinator() override; |
128 | 128 |
129 void SetIsNeverSuitableForReuse() override; | 129 void SetIsNeverSuitableForReuse() override; |
130 bool MayReuseHost() override; | 130 bool MayReuseHost() override; |
| 131 bool IsUnused() override; |
| 132 void SetIsUsed() override; |
131 | 133 |
132 // IPC::Sender via RenderProcessHost. | 134 // IPC::Sender via RenderProcessHost. |
133 bool Send(IPC::Message* msg) override; | 135 bool Send(IPC::Message* msg) override; |
134 | 136 |
135 // IPC::Listener via RenderProcessHost. | 137 // IPC::Listener via RenderProcessHost. |
136 bool OnMessageReceived(const IPC::Message& msg) override; | 138 bool OnMessageReceived(const IPC::Message& msg) override; |
137 void OnChannelConnected(int32_t peer_pid) override; | 139 void OnChannelConnected(int32_t peer_pid) override; |
138 | 140 |
139 // Attaches the factory object so we can remove this object in its destructor | 141 // Attaches the factory object so we can remove this object in its destructor |
140 // and prevent MockRenderProcessHostFacotry from deleting it. | 142 // and prevent MockRenderProcessHostFacotry from deleting it. |
(...skipping 25 matching lines...) Expand all Loading... |
166 bool has_connection_; | 168 bool has_connection_; |
167 BrowserContext* browser_context_; | 169 BrowserContext* browser_context_; |
168 base::ObserverList<RenderProcessHostObserver> observers_; | 170 base::ObserverList<RenderProcessHostObserver> observers_; |
169 | 171 |
170 int prev_routing_id_; | 172 int prev_routing_id_; |
171 IDMap<IPC::Listener*> listeners_; | 173 IDMap<IPC::Listener*> listeners_; |
172 bool fast_shutdown_started_; | 174 bool fast_shutdown_started_; |
173 bool deletion_callback_called_; | 175 bool deletion_callback_called_; |
174 bool is_for_guests_only_; | 176 bool is_for_guests_only_; |
175 bool is_process_backgrounded_; | 177 bool is_process_backgrounded_; |
| 178 bool is_unused_; |
176 std::unique_ptr<base::ProcessHandle> process_handle; | 179 std::unique_ptr<base::ProcessHandle> process_handle; |
177 int worker_ref_count_; | 180 int worker_ref_count_; |
178 std::unique_ptr<mojo::AssociatedInterfacePtr<mojom::Renderer>> | 181 std::unique_ptr<mojo::AssociatedInterfacePtr<mojom::Renderer>> |
179 renderer_interface_; | 182 renderer_interface_; |
180 std::map<std::string, InterfaceBinder> binder_overrides_; | 183 std::map<std::string, InterfaceBinder> binder_overrides_; |
181 service_manager::Identity child_identity_; | 184 service_manager::Identity child_identity_; |
182 base::WeakPtrFactory<MockRenderProcessHost> weak_ptr_factory_; | 185 base::WeakPtrFactory<MockRenderProcessHost> weak_ptr_factory_; |
183 | 186 |
184 DISALLOW_COPY_AND_ASSIGN(MockRenderProcessHost); | 187 DISALLOW_COPY_AND_ASSIGN(MockRenderProcessHost); |
185 }; | 188 }; |
(...skipping 17 matching lines...) Expand all Loading... |
203 // for deleting all MockRenderProcessHosts that have not deleted by a test in | 206 // for deleting all MockRenderProcessHosts that have not deleted by a test in |
204 // the destructor and prevent them from being leaked. | 207 // the destructor and prevent them from being leaked. |
205 mutable std::vector<std::unique_ptr<MockRenderProcessHost>> processes_; | 208 mutable std::vector<std::unique_ptr<MockRenderProcessHost>> processes_; |
206 | 209 |
207 DISALLOW_COPY_AND_ASSIGN(MockRenderProcessHostFactory); | 210 DISALLOW_COPY_AND_ASSIGN(MockRenderProcessHostFactory); |
208 }; | 211 }; |
209 | 212 |
210 } // namespace content | 213 } // namespace content |
211 | 214 |
212 #endif // CONTENT_PUBLIC_TEST_MOCK_RENDER_PROCESS_HOST_H_ | 215 #endif // CONTENT_PUBLIC_TEST_MOCK_RENDER_PROCESS_HOST_H_ |
OLD | NEW |