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
|
2022-08-17 18:35:53 +00:00
|
|
|
index 2ade1a0771a8f9c3c790492aadbd711b97a4613c..4a5f3bf210869e55dbc735b70b5d27548f6b62a7 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
|
2022-08-17 18:35:53 +00:00
|
|
|
@@ -3271,6 +3271,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
|
2022-08-17 18:35:53 +00:00
|
|
|
index f399bc59be5705542b34185e7fe7202a029c40ea..3293b6e035a6ea182504aa2700866fea8c213f4c 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
|
2022-08-17 18:35:53 +00:00
|
|
|
@@ -270,6 +270,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.
|