| 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 93 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 104 // to access the partition they are assigned to. | 104 // to access the partition they are assigned to. |
| 105 class CONTENT_EXPORT RenderProcessHostImpl | 105 class CONTENT_EXPORT RenderProcessHostImpl |
| 106 : public RenderProcessHost, | 106 : public RenderProcessHost, |
| 107 public ChildProcessLauncher::Client, | 107 public ChildProcessLauncher::Client, |
| 108 public ui::GpuSwitchingObserver, | 108 public ui::GpuSwitchingObserver, |
| 109 public NON_EXPORTED_BASE(mojom::RouteProvider), | 109 public NON_EXPORTED_BASE(mojom::RouteProvider), |
| 110 public NON_EXPORTED_BASE(mojom::AssociatedInterfaceProvider) { | 110 public NON_EXPORTED_BASE(mojom::AssociatedInterfaceProvider) { |
| 111 public: | 111 public: |
| 112 RenderProcessHostImpl(BrowserContext* browser_context, | 112 RenderProcessHostImpl(BrowserContext* browser_context, |
| 113 StoragePartitionImpl* storage_partition_impl, | 113 StoragePartitionImpl* storage_partition_impl, |
| 114 bool is_for_guests_only); | 114 bool is_for_guests_only, |
| 115 int child_process_param_id); |
| 115 ~RenderProcessHostImpl() override; | 116 ~RenderProcessHostImpl() override; |
| 116 | 117 |
| 117 // RenderProcessHost implementation (public portion). | 118 // RenderProcessHost implementation (public portion). |
| 118 bool Init() override; | 119 bool Init() override; |
| 119 void EnableSendQueue() override; | 120 void EnableSendQueue() override; |
| 120 int GetNextRoutingID() override; | 121 int GetNextRoutingID() override; |
| 121 void AddRoute(int32_t routing_id, IPC::Listener* listener) override; | 122 void AddRoute(int32_t routing_id, IPC::Listener* listener) override; |
| 122 void RemoveRoute(int32_t routing_id) override; | 123 void RemoveRoute(int32_t routing_id) override; |
| 123 void AddObserver(RenderProcessHostObserver* observer) override; | 124 void AddObserver(RenderProcessHostObserver* observer) override; |
| 124 void RemoveObserver(RenderProcessHostObserver* observer) override; | 125 void RemoveObserver(RenderProcessHostObserver* observer) override; |
| (...skipping 374 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 499 // PlzNavigate | 500 // PlzNavigate |
| 500 // Stores the time at which the first call to Init happened. | 501 // Stores the time at which the first call to Init happened. |
| 501 base::TimeTicks init_time_; | 502 base::TimeTicks init_time_; |
| 502 | 503 |
| 503 // Used to launch and terminate the process without blocking the UI thread. | 504 // Used to launch and terminate the process without blocking the UI thread. |
| 504 std::unique_ptr<ChildProcessLauncher> child_process_launcher_; | 505 std::unique_ptr<ChildProcessLauncher> child_process_launcher_; |
| 505 | 506 |
| 506 // The globally-unique identifier for this RPH. | 507 // The globally-unique identifier for this RPH. |
| 507 const int id_; | 508 const int id_; |
| 508 | 509 |
| 510 // An opaque id used passed to ChildProcessLauncher to launch child processes. |
| 511 const int child_process_param_id_; |
| 512 |
| 509 // A secondary ID used by the Service Manager to distinguish different | 513 // A secondary ID used by the Service Manager to distinguish different |
| 510 // incarnations of the same RPH from each other. Unlike |id_| this is not | 514 // incarnations of the same RPH from each other. Unlike |id_| this is not |
| 511 // globally unique, but it is guaranteed to change every time ProcessDied() is | 515 // globally unique, but it is guaranteed to change every time ProcessDied() is |
| 512 // called. | 516 // called. |
| 513 int instance_id_ = 1; | 517 int instance_id_ = 1; |
| 514 | 518 |
| 515 BrowserContext* const browser_context_; | 519 BrowserContext* const browser_context_; |
| 516 | 520 |
| 517 // Owned by |browser_context_|. | 521 // Owned by |browser_context_|. |
| 518 StoragePartitionImpl* storage_partition_impl_; | 522 StoragePartitionImpl* storage_partition_impl_; |
| (...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 617 instance_weak_factory_; | 621 instance_weak_factory_; |
| 618 | 622 |
| 619 base::WeakPtrFactory<RenderProcessHostImpl> weak_factory_; | 623 base::WeakPtrFactory<RenderProcessHostImpl> weak_factory_; |
| 620 | 624 |
| 621 DISALLOW_COPY_AND_ASSIGN(RenderProcessHostImpl); | 625 DISALLOW_COPY_AND_ASSIGN(RenderProcessHostImpl); |
| 622 }; | 626 }; |
| 623 | 627 |
| 624 } // namespace content | 628 } // namespace content |
| 625 | 629 |
| 626 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_PROCESS_HOST_IMPL_H_ | 630 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_PROCESS_HOST_IMPL_H_ |
| OLD | NEW |