2018-10-24 18:24:11 +00:00
|
|
|
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
2018-09-21 00:30:26 +00:00
|
|
|
From: deepak1556 <hop2deep@gmail.com>
|
2019-06-04 03:44:12 +00:00
|
|
|
Date: Mon, 3 Jun 2019 14:20:05 -0700
|
2018-09-21 00:30:26 +00:00
|
|
|
Subject: frame_host_manager.patch
|
|
|
|
|
2021-04-22 17:55:32 +00:00
|
|
|
Allows embedder to intercept site instances created by chromium.
|
2018-09-21 00:30:26 +00:00
|
|
|
|
2020-09-21 08:00:36 +00:00
|
|
|
diff --git a/content/browser/renderer_host/render_frame_host_manager.cc b/content/browser/renderer_host/render_frame_host_manager.cc
|
2021-10-21 18:51:36 +00:00
|
|
|
index 8d4a43dc12b06f5a39129acb5477a02844e74366..4d45e8ddeb90383dd7fe1e941c5868a72822cbe9 100644
|
2020-09-21 08:00:36 +00:00
|
|
|
--- a/content/browser/renderer_host/render_frame_host_manager.cc
|
|
|
|
+++ b/content/browser/renderer_host/render_frame_host_manager.cc
|
2021-10-21 18:51:36 +00:00
|
|
|
@@ -3070,6 +3070,9 @@ RenderFrameHostManager::GetSiteInstanceForNavigationRequest(
|
2020-03-03 21:35:05 +00:00
|
|
|
request->ResetStateForSiteInstanceChange();
|
|
|
|
}
|
2018-12-05 08:03:39 +00:00
|
|
|
|
|
|
|
+ GetContentClient()->browser()->RegisterPendingSiteInstance(
|
|
|
|
+ render_frame_host_.get(), dest_site_instance.get());
|
|
|
|
+
|
|
|
|
return dest_site_instance;
|
|
|
|
}
|
|
|
|
|
2018-09-14 05:02:16 +00:00
|
|
|
diff --git a/content/public/browser/content_browser_client.h b/content/public/browser/content_browser_client.h
|
2021-10-21 18:51:36 +00:00
|
|
|
index f0e2a061bb35fd3db26c7d235e1196273036925f..263ce75539f2fd215a45645e93271b3e65451d1a 100644
|
2018-09-14 05:02:16 +00:00
|
|
|
--- a/content/public/browser/content_browser_client.h
|
|
|
|
+++ b/content/public/browser/content_browser_client.h
|
2021-10-21 18:51:36 +00:00
|
|
|
@@ -274,6 +274,11 @@ class CONTENT_EXPORT ContentBrowserClient {
|
2020-01-17 18:41:52 +00:00
|
|
|
|
2020-12-22 22:14:44 +00:00
|
|
|
virtual ~ContentBrowserClient() = default;
|
2018-09-14 05:02:16 +00:00
|
|
|
|
2018-12-05 08:03:39 +00:00
|
|
|
+ // Electron: Registers a pending site instance during a navigation.
|
|
|
|
+ virtual void RegisterPendingSiteInstance(
|
|
|
|
+ content::RenderFrameHost* rfh,
|
2019-02-27 01:43:34 +00:00
|
|
|
+ content::SiteInstance* pending_site_instance) {}
|
2018-09-14 05:02:16 +00:00
|
|
|
+
|
|
|
|
// Allows the embedder to set any number of custom BrowserMainParts
|
|
|
|
// implementations for the browser startup code. See comments in
|
|
|
|
// browser_main_parts.h.
|