| 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_BROWSER_RENDERER_HOST_RENDER_PROCESS_HOST_IMPL_H_ | 5 #ifndef CONTENT_BROWSER_RENDERER_HOST_RENDER_PROCESS_HOST_IMPL_H_ |
| 6 #define CONTENT_BROWSER_RENDERER_HOST_RENDER_PROCESS_HOST_IMPL_H_ | 6 #define CONTENT_BROWSER_RENDERER_HOST_RENDER_PROCESS_HOST_IMPL_H_ |
| 7 | 7 |
| 8 #include <stddef.h> | 8 #include <stddef.h> |
| 9 #include <stdint.h> | 9 #include <stdint.h> |
| 10 | 10 |
| (...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 168 override; | 168 override; |
| 169 const base::TimeTicks& GetInitTimeForNavigationMetrics() const override; | 169 const base::TimeTicks& GetInitTimeForNavigationMetrics() const override; |
| 170 bool IsProcessBackgrounded() const override; | 170 bool IsProcessBackgrounded() const override; |
| 171 void IncrementServiceWorkerRefCount() override; | 171 void IncrementServiceWorkerRefCount() override; |
| 172 void DecrementServiceWorkerRefCount() override; | 172 void DecrementServiceWorkerRefCount() override; |
| 173 void IncrementSharedWorkerRefCount() override; | 173 void IncrementSharedWorkerRefCount() override; |
| 174 void DecrementSharedWorkerRefCount() override; | 174 void DecrementSharedWorkerRefCount() override; |
| 175 void ForceReleaseWorkerRefCounts() override; | 175 void ForceReleaseWorkerRefCounts() override; |
| 176 bool IsWorkerRefCountDisabled() override; | 176 bool IsWorkerRefCountDisabled() override; |
| 177 void PurgeAndSuspend() override; | 177 void PurgeAndSuspend() override; |
| 178 void Resume() override; |
| 179 const base::TimeTicks& GetLastPurgedAndSuspendedTime() const override; |
| 180 const base::TimeTicks& GetLastResumedInBackgroundTime() const override; |
| 178 | 181 |
| 179 mojom::RouteProvider* GetRemoteRouteProvider(); | 182 mojom::RouteProvider* GetRemoteRouteProvider(); |
| 180 mojom::Renderer* GetRendererInterface(); | 183 mojom::Renderer* GetRendererInterface(); |
| 181 | 184 |
| 182 // IPC::Sender via RenderProcessHost. | 185 // IPC::Sender via RenderProcessHost. |
| 183 bool Send(IPC::Message* msg) override; | 186 bool Send(IPC::Message* msg) override; |
| 184 | 187 |
| 185 // IPC::Listener via RenderProcessHost. | 188 // IPC::Listener via RenderProcessHost. |
| 186 bool OnMessageReceived(const IPC::Message& msg) override; | 189 bool OnMessageReceived(const IPC::Message& msg) override; |
| 187 void OnChannelConnected(int32_t peer_pid) override; | 190 void OnChannelConnected(int32_t peer_pid) override; |
| (...skipping 279 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 467 std::unique_ptr<base::Thread> in_process_renderer_; | 470 std::unique_ptr<base::Thread> in_process_renderer_; |
| 468 | 471 |
| 469 // True after Init() has been called. We can't just check channel_ because we | 472 // True after Init() has been called. We can't just check channel_ because we |
| 470 // also reset that in the case of process termination. | 473 // also reset that in the case of process termination. |
| 471 bool is_initialized_; | 474 bool is_initialized_; |
| 472 | 475 |
| 473 // PlzNavigate | 476 // PlzNavigate |
| 474 // Stores the time at which the first call to Init happened. | 477 // Stores the time at which the first call to Init happened. |
| 475 base::TimeTicks init_time_; | 478 base::TimeTicks init_time_; |
| 476 | 479 |
| 480 // The last time when the renderer is purged and suspended. |
| 481 base::TimeTicks last_purged_and_suspended_time_; |
| 482 |
| 483 // The last time when the renderer is resumed in the background. |
| 484 base::TimeTicks last_resumed_in_background_time_; |
| 485 |
| 477 // Used to launch and terminate the process without blocking the UI thread. | 486 // Used to launch and terminate the process without blocking the UI thread. |
| 478 std::unique_ptr<ChildProcessLauncher> child_process_launcher_; | 487 std::unique_ptr<ChildProcessLauncher> child_process_launcher_; |
| 479 | 488 |
| 480 // Messages we queue before the ChannelProxy is created. | 489 // Messages we queue before the ChannelProxy is created. |
| 481 using MessageQueue = std::queue<std::unique_ptr<IPC::Message>>; | 490 using MessageQueue = std::queue<std::unique_ptr<IPC::Message>>; |
| 482 MessageQueue queued_messages_; | 491 MessageQueue queued_messages_; |
| 483 | 492 |
| 484 // The globally-unique identifier for this RPH. | 493 // The globally-unique identifier for this RPH. |
| 485 const int id_; | 494 const int id_; |
| 486 | 495 |
| (...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 589 instance_weak_factory_; | 598 instance_weak_factory_; |
| 590 | 599 |
| 591 base::WeakPtrFactory<RenderProcessHostImpl> weak_factory_; | 600 base::WeakPtrFactory<RenderProcessHostImpl> weak_factory_; |
| 592 | 601 |
| 593 DISALLOW_COPY_AND_ASSIGN(RenderProcessHostImpl); | 602 DISALLOW_COPY_AND_ASSIGN(RenderProcessHostImpl); |
| 594 }; | 603 }; |
| 595 | 604 |
| 596 } // namespace content | 605 } // namespace content |
| 597 | 606 |
| 598 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_PROCESS_HOST_IMPL_H_ | 607 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_PROCESS_HOST_IMPL_H_ |
| OLD | NEW |