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