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

Unified Diff: content/browser/renderer_host/render_process_host_impl.h

Issue 2857213005: PlzNavigate: implement process reuse for ServiceWorkers (Closed)
Patch Set: Addressed comments + fixed tests Created 3 years, 7 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 side-by-side diff with in-line comments
Download patch
Index: content/browser/renderer_host/render_process_host_impl.h
diff --git a/content/browser/renderer_host/render_process_host_impl.h b/content/browser/renderer_host/render_process_host_impl.h
index 1e4097edbd1158fbe7d11f75184a552ecef4f72f..8d5033e333f299c546c66977edd19e5b2a70dbe3 100644
--- a/content/browser/renderer_host/render_process_host_impl.h
+++ b/content/browser/renderer_host/render_process_host_impl.h
@@ -309,6 +309,25 @@ class CONTENT_EXPORT RenderProcessHostImpl
static void set_render_process_host_factory(
const RenderProcessHostFactory* rph_factory);
+ // Tracks which sites frames are hosted in which RenderProcessHosts.
+ static void AddFrameWithSite(BrowserContext* browser_context,
+ RenderProcessHost* render_process_host,
+ const GURL& site_url);
+ static void RemoveFrameWithSite(BrowserContext* browser_context,
+ RenderProcessHost* render_process_host,
+ const GURL& site_url);
+
+ // Tracks which sites navigations are expected to commit in which
+ // RenderProcessHosts.
+ static void AddExpectedNavigationToSite(
+ BrowserContext* browser_context,
+ RenderProcessHost* render_process_host,
+ const GURL& site_url);
+ static void RemoveExpectedNavigationToSite(
+ BrowserContext* browser_context,
+ RenderProcessHost* render_process_host,
+ const GURL& site_url);
+
protected:
// A proxy for our IPC::Channel that lives on the IO thread.
std::unique_ptr<IPC::ChannelProxy> channel_;
@@ -415,6 +434,12 @@ class CONTENT_EXPORT RenderProcessHostImpl
SiteInstanceImpl* site_instance,
bool is_for_guests_only);
+ // Returns a RenderProcessHost that is rendering |site_url| in one of its
+ // frames, or that is expecting a navigation to |site_url|.
+ static RenderProcessHost* FindReusableProcessHostForSite(
+ BrowserContext* browser_context,
+ const GURL& site_url);
+
#if BUILDFLAG(ENABLE_WEBRTC)
void OnRegisterAecDumpConsumer(int id);
void OnUnregisterAecDumpConsumer(int id);
« no previous file with comments | « content/browser/frame_host/render_frame_host_manager.cc ('k') | content/browser/renderer_host/render_process_host_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698