| 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 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 115 void DecrementServiceWorkerRefCount() override; | 115 void DecrementServiceWorkerRefCount() override; |
| 116 void IncrementSharedWorkerRefCount() override; | 116 void IncrementSharedWorkerRefCount() override; |
| 117 void DecrementSharedWorkerRefCount() override; | 117 void DecrementSharedWorkerRefCount() override; |
| 118 void ForceReleaseWorkerRefCounts() override; | 118 void ForceReleaseWorkerRefCounts() override; |
| 119 bool IsWorkerRefCountDisabled() override; | 119 bool IsWorkerRefCountDisabled() override; |
| 120 void PurgeAndSuspend() override; | 120 void PurgeAndSuspend() override; |
| 121 void Resume() override; | 121 void Resume() override; |
| 122 mojom::Renderer* GetRendererInterface() override; | 122 mojom::Renderer* GetRendererInterface() override; |
| 123 void SetIsNeverSuitableForReuse() override; | 123 void SetIsNeverSuitableForReuse() override; |
| 124 bool MayReuseHost() override; | 124 bool MayReuseHost() override; |
| 125 bool CanBecomeDedicatedProcess() override; |
| 126 void UnsetCanBecomeDedicatedProcess() override; |
| 125 | 127 |
| 126 // IPC::Sender via RenderProcessHost. | 128 // IPC::Sender via RenderProcessHost. |
| 127 bool Send(IPC::Message* msg) override; | 129 bool Send(IPC::Message* msg) override; |
| 128 | 130 |
| 129 // IPC::Listener via RenderProcessHost. | 131 // IPC::Listener via RenderProcessHost. |
| 130 bool OnMessageReceived(const IPC::Message& msg) override; | 132 bool OnMessageReceived(const IPC::Message& msg) override; |
| 131 void OnChannelConnected(int32_t peer_pid) override; | 133 void OnChannelConnected(int32_t peer_pid) override; |
| 132 | 134 |
| 133 // Attaches the factory object so we can remove this object in its destructor | 135 // Attaches the factory object so we can remove this object in its destructor |
| 134 // and prevent MockRenderProcessHostFacotry from deleting it. | 136 // and prevent MockRenderProcessHostFacotry from deleting it. |
| (...skipping 26 matching lines...) Expand all Loading... |
| 161 BrowserContext* browser_context_; | 163 BrowserContext* browser_context_; |
| 162 base::ObserverList<RenderProcessHostObserver> observers_; | 164 base::ObserverList<RenderProcessHostObserver> observers_; |
| 163 | 165 |
| 164 IDMap<RenderWidgetHost*> render_widget_hosts_; | 166 IDMap<RenderWidgetHost*> render_widget_hosts_; |
| 165 int prev_routing_id_; | 167 int prev_routing_id_; |
| 166 IDMap<IPC::Listener*> listeners_; | 168 IDMap<IPC::Listener*> listeners_; |
| 167 bool fast_shutdown_started_; | 169 bool fast_shutdown_started_; |
| 168 bool deletion_callback_called_; | 170 bool deletion_callback_called_; |
| 169 bool is_for_guests_only_; | 171 bool is_for_guests_only_; |
| 170 bool is_process_backgrounded_; | 172 bool is_process_backgrounded_; |
| 173 bool can_become_dedicated_process_; |
| 171 std::unique_ptr<base::ProcessHandle> process_handle; | 174 std::unique_ptr<base::ProcessHandle> process_handle; |
| 172 int worker_ref_count_; | 175 int worker_ref_count_; |
| 173 std::unique_ptr<mojo::AssociatedInterfacePtr<mojom::Renderer>> | 176 std::unique_ptr<mojo::AssociatedInterfacePtr<mojom::Renderer>> |
| 174 renderer_interface_; | 177 renderer_interface_; |
| 175 std::map<std::string, InterfaceBinder> binder_overrides_; | 178 std::map<std::string, InterfaceBinder> binder_overrides_; |
| 176 service_manager::Identity child_identity_; | 179 service_manager::Identity child_identity_; |
| 177 | 180 |
| 178 DISALLOW_COPY_AND_ASSIGN(MockRenderProcessHost); | 181 DISALLOW_COPY_AND_ASSIGN(MockRenderProcessHost); |
| 179 }; | 182 }; |
| 180 | 183 |
| (...skipping 16 matching lines...) Expand all Loading... |
| 197 // for deleting all MockRenderProcessHosts that have not deleted by a test in | 200 // for deleting all MockRenderProcessHosts that have not deleted by a test in |
| 198 // the destructor and prevent them from being leaked. | 201 // the destructor and prevent them from being leaked. |
| 199 mutable std::vector<std::unique_ptr<MockRenderProcessHost>> processes_; | 202 mutable std::vector<std::unique_ptr<MockRenderProcessHost>> processes_; |
| 200 | 203 |
| 201 DISALLOW_COPY_AND_ASSIGN(MockRenderProcessHostFactory); | 204 DISALLOW_COPY_AND_ASSIGN(MockRenderProcessHostFactory); |
| 202 }; | 205 }; |
| 203 | 206 |
| 204 } // namespace content | 207 } // namespace content |
| 205 | 208 |
| 206 #endif // CONTENT_PUBLIC_TEST_MOCK_RENDER_PROCESS_HOST_H_ | 209 #endif // CONTENT_PUBLIC_TEST_MOCK_RENDER_PROCESS_HOST_H_ |
| OLD | NEW |