mirror of
https://github.com/electron/electron.git
synced 2026-04-10 03:01:51 -04:00
fix: update frame host manager patch for new state transitions
Refs: https://chromium-review.googlesource.com/c/chromium/src/+/2714464
This commit is contained in:
@@ -42,7 +42,7 @@ index f426d1ebdaa9d13c7e47f22ce617e2b61a862854..26907541dd4268e3f8c82676bdda892b
|
||||
// another SiteInstance for the same site.
|
||||
void RegisterSiteInstance(SiteInstanceImpl* site_instance);
|
||||
diff --git a/content/browser/renderer_host/navigation_request.cc b/content/browser/renderer_host/navigation_request.cc
|
||||
index 1f0b01cbf17267bd8c03deb4a28938566f7033ef..ecccd1657fd31569a0e490b1b4556eda62acfc6a 100644
|
||||
index 1f0b01cbf17267bd8c03deb4a28938566f7033ef..5ccf84c2b847e9d2cbc97f4b2390220324a807c3 100644
|
||||
--- a/content/browser/renderer_host/navigation_request.cc
|
||||
+++ b/content/browser/renderer_host/navigation_request.cc
|
||||
@@ -1572,6 +1572,21 @@ void NavigationRequest::BeginNavigation() {
|
||||
@@ -75,7 +75,7 @@ index 1f0b01cbf17267bd8c03deb4a28938566f7033ef..ecccd1657fd31569a0e490b1b4556eda
|
||||
READY_TO_COMMIT,
|
||||
DID_COMMIT,
|
||||
CANCELING,
|
||||
@@ -6165,10 +6181,14 @@ void NavigationRequest::CheckStateTransition(NavigationState state) const {
|
||||
@@ -6165,10 +6181,15 @@ void NavigationRequest::CheckStateTransition(NavigationState state) const {
|
||||
WILL_FAIL_REQUEST,
|
||||
}},
|
||||
{WILL_PROCESS_RESPONSE, {
|
||||
@@ -85,6 +85,7 @@ index 1f0b01cbf17267bd8c03deb4a28938566f7033ef..ecccd1657fd31569a0e490b1b4556eda
|
||||
WILL_FAIL_REQUEST,
|
||||
}},
|
||||
+ {REUSE_SITE_INSTANCE, {
|
||||
+ WILL_PROCESS_RESPONSE,
|
||||
+ READY_TO_COMMIT,
|
||||
+ }},
|
||||
{READY_TO_COMMIT, {
|
||||
@@ -227,6 +228,24 @@ index 40c314243ae5aa8540ce6528273ee2f0b7f0aca1..dce5cf6cde036d35c1b78b8fa7686176
|
||||
bool IsRelatedSiteInstance(const SiteInstance* instance) override;
|
||||
size_t GetRelatedActiveContentsCount() override;
|
||||
bool RequiresDedicatedProcess() override;
|
||||
diff --git a/content/common/view_messages.h.rej b/content/common/view_messages.h.rej
|
||||
new file mode 100644
|
||||
index 0000000000000000000000000000000000000000..e6d6686864b85c25dd62eb451f34a3dd7af03120
|
||||
--- /dev/null
|
||||
+++ b/content/common/view_messages.h.rej
|
||||
@@ -0,0 +1,12 @@
|
||||
+--- content/common/view_messages.h
|
||||
++++ content/common/view_messages.h
|
||||
+@@ -94,6 +94,9 @@ IPC_STRUCT_TRAITS_END()
|
||||
+
|
||||
+ // Messages sent from the browser to the renderer.
|
||||
+
|
||||
++// Whether to enable the Renderer scheduler background throttling.
|
||||
++IPC_MESSAGE_ROUTED1(ViewMsg_SetSchedulerThrottling, bool /* allowed */)
|
||||
++
|
||||
+ // This passes a set of webkit preferences down to the renderer.
|
||||
+ IPC_MESSAGE_ROUTED1(ViewMsg_UpdateWebPreferences,
|
||||
+ blink::web_pref::WebPreferences)
|
||||
diff --git a/content/public/browser/content_browser_client.cc b/content/public/browser/content_browser_client.cc
|
||||
index 0d2eba4321ece3e9cfb2b16dead343dd51672714..45fe96cb01e4d6e2772f1304eb1c5ac274c4f713 100644
|
||||
--- a/content/public/browser/content_browser_client.cc
|
||||
@@ -319,3 +338,33 @@ index 9b90d52cac2b6a0d15e1ec1f562f0e376ce6be7c..5bc69adfab68c45528ba8d5e81b03b3f
|
||||
// Gets a SiteInstance for the given URL that shares the current
|
||||
// BrowsingInstance, creating a new SiteInstance if necessary. This ensures
|
||||
// that a BrowsingInstance only has one SiteInstance per site, so that pages
|
||||
diff --git a/content/renderer/render_view_impl.cc.rej b/content/renderer/render_view_impl.cc.rej
|
||||
new file mode 100644
|
||||
index 0000000000000000000000000000000000000000..578ae91df31857a98b7afe50a464c388057391a5
|
||||
--- /dev/null
|
||||
+++ b/content/renderer/render_view_impl.cc.rej
|
||||
@@ -0,0 +1,24 @@
|
||||
+--- content/renderer/render_view_impl.cc
|
||||
++++ content/renderer/render_view_impl.cc
|
||||
+@@ -575,6 +575,8 @@ bool RenderViewImpl::OnMessageReceived(const IPC::Message& message) {
|
||||
+
|
||||
+ bool handled = true;
|
||||
+ IPC_BEGIN_MESSAGE_MAP(RenderViewImpl, message)
|
||||
++ IPC_MESSAGE_HANDLER(ViewMsg_SetSchedulerThrottling,
|
||||
++ OnSetSchedulerThrottling)
|
||||
+ IPC_MESSAGE_HANDLER(ViewMsg_UpdateWebPreferences, OnUpdateWebPreferences)
|
||||
+ IPC_MESSAGE_HANDLER(ViewMsg_MoveOrResizeStarted, OnMoveOrResizeStarted)
|
||||
+
|
||||
+@@ -976,6 +978,12 @@ bool RenderViewImpl::GetContentStateImmediately() {
|
||||
+ return send_content_state_immediately_;
|
||||
+ }
|
||||
+
|
||||
++void RenderViewImpl::OnSetSchedulerThrottling(bool allowed) {
|
||||
++ if (!GetWebView())
|
||||
++ return;
|
||||
++ GetWebView()->SetSchedulerThrottling(allowed);
|
||||
++}
|
||||
++
|
||||
+ void RenderViewImpl::OnUpdateWebPreferences(
|
||||
+ const blink::web_pref::WebPreferences& prefs) {
|
||||
+ webview_->SetWebPreferences(prefs);
|
||||
|
||||
Reference in New Issue
Block a user