Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(389)

Side by Side Diff: content/browser/renderer_host/render_process_host_impl.h

Issue 2929113002: Enable spare RenderProcessHost to be preinitialized. (Closed)
Patch Set: remove race from test Created 3 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 96 matching lines...) Expand 10 before | Expand all | Expand 10 after
107 // because all the IPCs from the RenderViews (renderer) will only ever be able 107 // because all the IPCs from the RenderViews (renderer) will only ever be able
108 // to access the partition they are assigned to. 108 // to access the partition they are assigned to.
109 class CONTENT_EXPORT RenderProcessHostImpl 109 class CONTENT_EXPORT RenderProcessHostImpl
110 : public RenderProcessHost, 110 : public RenderProcessHost,
111 public ChildProcessLauncher::Client, 111 public ChildProcessLauncher::Client,
112 public ui::GpuSwitchingObserver, 112 public ui::GpuSwitchingObserver,
113 public NON_EXPORTED_BASE(mojom::RouteProvider), 113 public NON_EXPORTED_BASE(mojom::RouteProvider),
114 public NON_EXPORTED_BASE(mojom::AssociatedInterfaceProvider), 114 public NON_EXPORTED_BASE(mojom::AssociatedInterfaceProvider),
115 public NON_EXPORTED_BASE(mojom::RendererHost) { 115 public NON_EXPORTED_BASE(mojom::RendererHost) {
116 public: 116 public:
117 RenderProcessHostImpl(BrowserContext* browser_context, 117 static RenderProcessHost* CreateRenderProcessHost(
118 StoragePartitionImpl* storage_partition_impl, 118 BrowserContext* browser_context,
119 bool is_for_guests_only); 119 StoragePartitionImpl* storage_partition_impl,
120 bool is_for_guests_only);
121
120 ~RenderProcessHostImpl() override; 122 ~RenderProcessHostImpl() override;
121 123
122 // RenderProcessHost implementation (public portion). 124 // RenderProcessHost implementation (public portion).
123 bool Init() override; 125 bool Init() override;
124 void EnableSendQueue() override; 126 void EnableSendQueue() override;
125 int GetNextRoutingID() override; 127 int GetNextRoutingID() override;
126 void AddRoute(int32_t routing_id, IPC::Listener* listener) override; 128 void AddRoute(int32_t routing_id, IPC::Listener* listener) override;
127 void RemoveRoute(int32_t routing_id) override; 129 void RemoveRoute(int32_t routing_id) override;
128 void AddObserver(RenderProcessHostObserver* observer) override; 130 void AddObserver(RenderProcessHostObserver* observer) override;
129 void RemoveObserver(RenderProcessHostObserver* observer) override; 131 void RemoveObserver(RenderProcessHostObserver* observer) override;
(...skipping 224 matching lines...) Expand 10 before | Expand all | Expand 10 after
354 // started to swap these in, so the renderer process should not exit if 356 // started to swap these in, so the renderer process should not exit if
355 // this count is non-zero. 357 // this count is non-zero.
356 int32_t pending_views_; 358 int32_t pending_views_;
357 359
358 private: 360 private:
359 friend class ChildProcessLauncherBrowserTest_ChildSpawnFail_Test; 361 friend class ChildProcessLauncherBrowserTest_ChildSpawnFail_Test;
360 friend class VisitRelayingRenderProcessHost; 362 friend class VisitRelayingRenderProcessHost;
361 class ConnectionFilterController; 363 class ConnectionFilterController;
362 class ConnectionFilterImpl; 364 class ConnectionFilterImpl;
363 365
366 // Use CreateRenderProcessHostImpl() instead.
367 RenderProcessHostImpl(BrowserContext* browser_context,
368 StoragePartitionImpl* storage_partition_impl,
369 bool is_for_guests_only);
370
364 // Initializes a new IPC::ChannelProxy in |channel_|, which will be connected 371 // Initializes a new IPC::ChannelProxy in |channel_|, which will be connected
365 // to the next child process launched for this host, if any. 372 // to the next child process launched for this host, if any.
366 void InitializeChannelProxy(); 373 void InitializeChannelProxy();
367 374
368 // Resets |channel_|, removing it from the attachment broker if necessary. 375 // Resets |channel_|, removing it from the attachment broker if necessary.
369 // Always call this in lieu of directly resetting |channel_|. 376 // Always call this in lieu of directly resetting |channel_|.
370 void ResetChannelProxy(); 377 void ResetChannelProxy();
371 378
372 // Creates and adds the IO thread message filters. 379 // Creates and adds the IO thread message filters.
373 void CreateMessageFilters(); 380 void CreateMessageFilters();
(...skipping 332 matching lines...) Expand 10 before | Expand all | Expand 10 after
706 FrameSinkProviderImpl frame_sink_provider_; 713 FrameSinkProviderImpl frame_sink_provider_;
707 714
708 base::WeakPtrFactory<RenderProcessHostImpl> weak_factory_; 715 base::WeakPtrFactory<RenderProcessHostImpl> weak_factory_;
709 716
710 DISALLOW_COPY_AND_ASSIGN(RenderProcessHostImpl); 717 DISALLOW_COPY_AND_ASSIGN(RenderProcessHostImpl);
711 }; 718 };
712 719
713 } // namespace content 720 } // namespace content
714 721
715 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_PROCESS_HOST_IMPL_H_ 722 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_PROCESS_HOST_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698