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