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

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

Issue 2857213005: PlzNavigate: implement process reuse for ServiceWorkers (Closed)
Patch Set: 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 8a7936f8c8a2530a75371e599a35c6893160b4a8..d83dcd1c569b99055087a83b841ba2bd0510a767 100644
--- a/content/browser/renderer_host/render_process_host_impl.h
+++ b/content/browser/renderer_host/render_process_host_impl.h
@@ -311,6 +311,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,
clamy 2017/05/04 16:01:01 Due to the split RenderProcessHostImpl/MockRenderP
+ RenderProcessHost* render_process_host,
+ const GURL& site_url);
Charlie Reis 2017/05/15 03:41:52 Note: If we call these parameters |site_url|, then
clamy 2017/05/16 14:50:46 Done.
+ 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_;
@@ -409,6 +428,12 @@ class CONTENT_EXPORT RenderProcessHostImpl
BrowserContext* browser_context,
SiteInstanceImpl* site_instance);
+ // 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);

Powered by Google App Engine
This is Rietveld 408576698