mirror of
https://github.com/electron/electron.git
synced 2026-01-08 23:18:06 -05:00
* chore: bump chromium in DEPS to 128.0.6577.0 * chore: bump chromium in DEPS to 128.0.6579.0 * 5675706: Reland "Reland "Reland "Reland "Add toolchains without PartitionAlloc-Everywhere for dump_syms et al"""" https://chromium-review.googlesource.com/c/chromium/src/+/5675706 * 5668597: [PDF Ink Signatures] Prompt download menu on save when there are edits https://chromium-review.googlesource.com/c/chromium/src/+/5668597 * 5677014: Reland "Pull data_sharing_sdk from CIPD" https://chromium-review.googlesource.com/c/chromium/src/+/5677014 * chore: fixup patch indices * chore: bump chromium in DEPS to 128.0.6581.0 * chore: bump chromium in DEPS to 128.0.6583.0 * update patches * 5455480: [Extensions] Allow service worker requests to continue without a cert https://chromium-review.googlesource.com/c/chromium/src/+/5455480 * try to get some debugging output from script/push-patch.js * chore: bump chromium in DEPS to 128.0.6585.0 * chore: bump chromium in DEPS to 128.0.6587.0 * update patches * chore: bump chromium in DEPS to 128.0.6589.0 * more patch work * maybe over here? * chore: update patches * 5673207: [HTTPS Upgrades] Disable in captive portal login webview https://chromium-review.googlesource.com/c/chromium/src/+/5673207 * 5636785: Extensions: WAR: manifest.json's use_dynamic_url requires a dynamic url https://chromium-review.googlesource.com/c/chromium/src/+/5636785 * chore: bump chromium in DEPS to 128.0.6591.0 * 5665458: Trigger WN2 page when feature is enabled https://chromium-review.googlesource.com/c/chromium/src/+/5665458 * update patches * chore: bump chromium in DEPS to 128.0.6593.0 * chore: bump chromium in DEPS to 128.0.6595.0 * chore: bump chromium in DEPS to 128.0.6597.0 * (patch update) 5694586: [compile hints] Remove the usage of v8::Isolate::SetJavaScriptCompileHintsMagicEnabledCallback API https://chromium-review.googlesource.com/c/chromium/src/+/5694586 * update patches * 5691287: Reland "Change blink::WebKeyboardEvent to use std::array in is members" https://chromium-review.googlesource.com/c/chromium/src/+/5691287 The code changed here is modeled after code in `content/renderer/pepper/event_conversion.cc` that was also modified in this CL, so I took the same approach. * 5529018: Cleanup EnableWebHidOnExtensionServiceWorker flag https://chromium-review.googlesource.com/c/chromium/src/+/5529018 * 5526324: [Code Health] Add deprecation comment for base::SupportsWeakPtr. https://chromium-review.googlesource.com/c/chromium/src/+/5526324 Note that this CL actually does make `SupportsWeakPtr` strictly restricted to existing implementations, no new ones. We could add a patch to add ourselves to this list, but it looks like we'll have to refactor this anyways in the near future. Since the refactor seems straightforward, let's try that first. * chore: bump chromium in DEPS to 128.0.6598.0 * chore: update patches * 5704737: Rename ExclusiveAccessContext::GetActiveWebContents to avoid conflict https://chromium-review.googlesource.com/c/chromium/src/+/5704737 * chore: bump chromium in DEPS to 128.0.6601.0 * chore: update patches * Add `base::StringPiece` header includes Chromium is working on replacing `base::StringPiece` with `std::string_view`. (See the Chromium Bug below.) They're currently running mass codemods (across many multiple changes) to replace uses of `StringPiece` with `string_view`, including removing the header include for `StringPiece` in those files. This cascades down to our files that were implicitly depending on those includes through some other include. They're on track to eventually deprecate and remove `StringPiece` so our code should be converted, but that can be done as an upgrade follow-up task. For now, adding the header back to files that need it should suffice for minimal upgrade changes. Chromium Bug: https://issues.chromium.org/issues/40506050 * 5702737: GlobalRequestID: Avoid unwanted inlining and narrowing int conversions https://chromium-review.googlesource.com/c/chromium/src/+/5702737 contender for smallest commit 2024 * 5706534: Rename GlobalFeatures to GlobalDesktopFeatures. https://chromium-review.googlesource.com/c/chromium/src/+/5706534 * 5691321: ui: remove params variants of SelectFile listener functions https://chromium-review.googlesource.com/c/chromium/src/+/5691321 * 5714949: [Extensions] Display re-enable dialog for MV2 disabled stage https://chromium-review.googlesource.com/c/chromium/src/+/5714949 * chore: update libc++ filenames * patch: disable scope reuse & associated dchecks in v8 (hopefully temp, upgrade follow-up) * fixup! Add `base::StringPiece` header includes * update MAS patch 5710330: Add crash keys to debug NativeWidgetMacNSWindowBorderlessFrame exception https://chromium-review.googlesource.com/c/chromium/src/+/5710330 * chore: bump chromium in DEPS to 128.0.6603.0 * chore: update patches * 5713258: Reland "Preparation for decoupling creation/initialization of context" https://chromium-review.googlesource.com/c/chromium/src/+/5713258 When destroying a context, it must already be shutdown, and this change enforces it with a new CHECK. We were overriding `BrowserContextKeyedServiceFactory::BrowserContextShutdown` with an empty implementation, which differed from the default implementation that notifies the `KeyedServiceFactory` that the context has shutdown. Since we were missing this notification, the CHECK would later trip when the service was being destoryed because it was not registered as shutdown when it was shutdown. * chore: bump chromium in DEPS to 128.0.6605.2 * chore: update patches * refactor: linux open/save dialog patch Our existing implementation was relying on an opaque `void* params` parameter that was passed through `ui::SelectFileDialog`. Recently, that parameter has been getting removed: - 5691321: ui: remove params variants of SelectFile listener functions | https://chromium-review.googlesource.com/c/chromium/src/+/5691321 - 5709097: ui: remove SelectFileDialog impl params | https://chromium-review.googlesource.com/c/chromium/src/+/5709097 - https://issues.chromium.org/issues/340178601 "reconsider SelectFileDialog" This restructures the patch to work with mostly the same mechanics, but directly on the `ui::SelectFileDialog` object. This nets us some wins in terms of a smaller patch. * 5713262: DevTools UI binding AIDA client event returns response https://chromium-review.googlesource.com/c/chromium/src/+/5713262 * fixup! refactor: linux open/save dialog patch * chore: bump chromium in DEPS to 128.0.6606.0 * chore: update patches * fixup! refactor: linux open/save dialog patch * chore: bump chromium in DEPS to 128.0.6607.0 * chore: update printing.patch Xref: https://chromium-review.googlesource.com/c/chromium/src/+/5722937 * fix: pwd error in electron-test, nan-test fix: unshallow depot_tools before 3-way apply * chore: e patches all * fixup! fix: pwd error in electron-test, nan-test * chore: bump chromium in DEPS to 128.0.6609.0 * chore: bump chromium in DEPS to 128.0.6611.0 * chore: update patches * chore: update libcxx filenames --------- Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com> Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com> Co-authored-by: Jeremy Rose <nornagon@nornagon.net> Co-authored-by: PatchUp <73610968+patchup[bot]@users.noreply.github.com> Co-authored-by: clavin <clavin@electronjs.org> Co-authored-by: Charles Kerr <charles@charleskerr.com> Co-authored-by: Alice Zhao <alice@makenotion.com>
388 lines
22 KiB
Diff
388 lines
22 KiB
Diff
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
From: Andy Locascio <andy@slack-corp.com>
|
|
Date: Wed, 9 Sep 2020 16:56:06 -0700
|
|
Subject: chore: provide IsWebContentsCreationOverridden with full params
|
|
|
|
Pending upstream patch, this gives us fuller access to the window.open params
|
|
so that we will be able to decide whether to cancel it or not.
|
|
|
|
diff --git a/chrome/browser/media/offscreen_tab.cc b/chrome/browser/media/offscreen_tab.cc
|
|
index bfcdf050e603b953d15a0898200c8f031a1f84c6..b1f163b6da4d2197d404a5a0fbd31a5b346d3d69 100644
|
|
--- a/chrome/browser/media/offscreen_tab.cc
|
|
+++ b/chrome/browser/media/offscreen_tab.cc
|
|
@@ -286,8 +286,7 @@ bool OffscreenTab::IsWebContentsCreationOverridden(
|
|
content::SiteInstance* source_site_instance,
|
|
content::mojom::WindowContainerType window_container_type,
|
|
const GURL& opener_url,
|
|
- const std::string& frame_name,
|
|
- const GURL& target_url) {
|
|
+ const content::mojom::CreateNewWindowParams& params) {
|
|
// Disallow creating separate WebContentses. The WebContents implementation
|
|
// uses this to spawn new windows/tabs, which is also not allowed for
|
|
// offscreen tabs.
|
|
diff --git a/chrome/browser/media/offscreen_tab.h b/chrome/browser/media/offscreen_tab.h
|
|
index 0163968067f2607507493a5e0816aa814de3ba0b..34b94af6a4e3f031a35520fde4173e186ebec0b7 100644
|
|
--- a/chrome/browser/media/offscreen_tab.h
|
|
+++ b/chrome/browser/media/offscreen_tab.h
|
|
@@ -107,8 +107,7 @@ class OffscreenTab final : public ProfileObserver,
|
|
content::SiteInstance* source_site_instance,
|
|
content::mojom::WindowContainerType window_container_type,
|
|
const GURL& opener_url,
|
|
- const std::string& frame_name,
|
|
- const GURL& target_url) final;
|
|
+ const content::mojom::CreateNewWindowParams& params) override;
|
|
void EnterFullscreenModeForTab(
|
|
content::RenderFrameHost* requesting_frame,
|
|
const blink::mojom::FullscreenOptions& options) final;
|
|
diff --git a/chrome/browser/ui/ash/ash_web_view_impl.cc b/chrome/browser/ui/ash/ash_web_view_impl.cc
|
|
index 67ffe13ccdd08e572089918ad07b9d3f2167f2a3..361feb0ea0121363906c69c1b7be272bfd8e5595 100644
|
|
--- a/chrome/browser/ui/ash/ash_web_view_impl.cc
|
|
+++ b/chrome/browser/ui/ash/ash_web_view_impl.cc
|
|
@@ -118,10 +118,9 @@ bool AshWebViewImpl::IsWebContentsCreationOverridden(
|
|
content::SiteInstance* source_site_instance,
|
|
content::mojom::WindowContainerType window_container_type,
|
|
const GURL& opener_url,
|
|
- const std::string& frame_name,
|
|
- const GURL& target_url) {
|
|
+ const content::mojom::CreateNewWindowParams& params) {
|
|
if (params_.suppress_navigation) {
|
|
- NotifyDidSuppressNavigation(target_url,
|
|
+ NotifyDidSuppressNavigation(params.target_url,
|
|
WindowOpenDisposition::NEW_FOREGROUND_TAB,
|
|
/*from_user_gesture=*/true);
|
|
return true;
|
|
diff --git a/chrome/browser/ui/ash/ash_web_view_impl.h b/chrome/browser/ui/ash/ash_web_view_impl.h
|
|
index c234fda285ae347979ef77683a4340aa48979dbd..2699e20320e5b957656c1035d10aa3b7082bc1a2 100644
|
|
--- a/chrome/browser/ui/ash/ash_web_view_impl.h
|
|
+++ b/chrome/browser/ui/ash/ash_web_view_impl.h
|
|
@@ -59,8 +59,7 @@ class AshWebViewImpl : public ash::AshWebView,
|
|
content::SiteInstance* source_site_instance,
|
|
content::mojom::WindowContainerType window_container_type,
|
|
const GURL& opener_url,
|
|
- const std::string& frame_name,
|
|
- const GURL& target_url) override;
|
|
+ const content::mojom::CreateNewWindowParams& params) override;
|
|
content::WebContents* OpenURLFromTab(
|
|
content::WebContents* source,
|
|
const content::OpenURLParams& params,
|
|
diff --git a/chrome/browser/ui/ash/keyboard/chrome_keyboard_web_contents.cc b/chrome/browser/ui/ash/keyboard/chrome_keyboard_web_contents.cc
|
|
index 28cd699814f32a7a569d63936b9544567a66d9c4..fd461fa448d983481dc4c0c7d03b1945a7a13c46 100644
|
|
--- a/chrome/browser/ui/ash/keyboard/chrome_keyboard_web_contents.cc
|
|
+++ b/chrome/browser/ui/ash/keyboard/chrome_keyboard_web_contents.cc
|
|
@@ -79,8 +79,7 @@ class ChromeKeyboardContentsDelegate : public content::WebContentsDelegate,
|
|
content::SiteInstance* source_site_instance,
|
|
content::mojom::WindowContainerType window_container_type,
|
|
const GURL& opener_url,
|
|
- const std::string& frame_name,
|
|
- const GURL& target_url) override {
|
|
+ const content::mojom::CreateNewWindowParams& params) override {
|
|
return true;
|
|
}
|
|
|
|
diff --git a/chrome/browser/ui/browser.cc b/chrome/browser/ui/browser.cc
|
|
index e53015c127ada628fec797fb4d9e553b1010f353..b04d6307475d10be9431b37c97ae514795b40842 100644
|
|
--- a/chrome/browser/ui/browser.cc
|
|
+++ b/chrome/browser/ui/browser.cc
|
|
@@ -2068,12 +2068,11 @@ bool Browser::IsWebContentsCreationOverridden(
|
|
content::SiteInstance* source_site_instance,
|
|
content::mojom::WindowContainerType window_container_type,
|
|
const GURL& opener_url,
|
|
- const std::string& frame_name,
|
|
- const GURL& target_url) {
|
|
+ const content::mojom::CreateNewWindowParams& params) {
|
|
return window_container_type ==
|
|
content::mojom::WindowContainerType::BACKGROUND &&
|
|
ShouldCreateBackgroundContents(source_site_instance, opener_url,
|
|
- frame_name);
|
|
+ params.frame_name);
|
|
}
|
|
|
|
WebContents* Browser::CreateCustomWebContents(
|
|
diff --git a/chrome/browser/ui/browser.h b/chrome/browser/ui/browser.h
|
|
index cbc5ae1c02941bcf9b2adedbac2eb1baf7227305..0d204f9d06d59f2b6464df3009af1edc75ebe6b0 100644
|
|
--- a/chrome/browser/ui/browser.h
|
|
+++ b/chrome/browser/ui/browser.h
|
|
@@ -977,8 +977,7 @@ class Browser : public TabStripModelObserver,
|
|
content::SiteInstance* source_site_instance,
|
|
content::mojom::WindowContainerType window_container_type,
|
|
const GURL& opener_url,
|
|
- const std::string& frame_name,
|
|
- const GURL& target_url) override;
|
|
+ const content::mojom::CreateNewWindowParams& params) override;
|
|
content::WebContents* CreateCustomWebContents(
|
|
content::RenderFrameHost* opener,
|
|
content::SiteInstance* source_site_instance,
|
|
diff --git a/chrome/browser/ui/media_router/presentation_receiver_window_controller.cc b/chrome/browser/ui/media_router/presentation_receiver_window_controller.cc
|
|
index 58506f1c2e9e20c77cd26172e6b52e71ffb8e515..052c00d29e3f517440e28f56cf61fd33655e2804 100644
|
|
--- a/chrome/browser/ui/media_router/presentation_receiver_window_controller.cc
|
|
+++ b/chrome/browser/ui/media_router/presentation_receiver_window_controller.cc
|
|
@@ -203,8 +203,7 @@ bool PresentationReceiverWindowController::IsWebContentsCreationOverridden(
|
|
content::SiteInstance* source_site_instance,
|
|
content::mojom::WindowContainerType window_container_type,
|
|
const GURL& opener_url,
|
|
- const std::string& frame_name,
|
|
- const GURL& target_url) {
|
|
+ const content::mojom::CreateNewWindowParams& params) {
|
|
// Disallow creating separate WebContentses. The WebContents implementation
|
|
// uses this to spawn new windows/tabs, which is also not allowed for
|
|
// local presentations.
|
|
diff --git a/chrome/browser/ui/media_router/presentation_receiver_window_controller.h b/chrome/browser/ui/media_router/presentation_receiver_window_controller.h
|
|
index ca72b324bf7c3b81ac94b53f0ff454d2df177950..d60ef3075d126e2bbd50c8469f2bf67cfa05c6f7 100644
|
|
--- a/chrome/browser/ui/media_router/presentation_receiver_window_controller.h
|
|
+++ b/chrome/browser/ui/media_router/presentation_receiver_window_controller.h
|
|
@@ -105,8 +105,7 @@ class PresentationReceiverWindowController final
|
|
content::SiteInstance* source_site_instance,
|
|
content::mojom::WindowContainerType window_container_type,
|
|
const GURL& opener_url,
|
|
- const std::string& frame_name,
|
|
- const GURL& target_url) override;
|
|
+ const content::mojom::CreateNewWindowParams& params) override;
|
|
|
|
// The profile used for the presentation.
|
|
raw_ptr<Profile, DanglingUntriaged> otr_profile_;
|
|
diff --git a/chrome/browser/ui/views/hats/hats_next_web_dialog.cc b/chrome/browser/ui/views/hats/hats_next_web_dialog.cc
|
|
index 1b29ac2afdbbc10ea59649b741e17583abf10536..cef3d60636e39cab514c45a085cc3a1d6587729a 100644
|
|
--- a/chrome/browser/ui/views/hats/hats_next_web_dialog.cc
|
|
+++ b/chrome/browser/ui/views/hats/hats_next_web_dialog.cc
|
|
@@ -75,8 +75,7 @@ class HatsNextWebDialog::HatsWebView : public views::WebView {
|
|
content::SiteInstance* source_site_instance,
|
|
content::mojom::WindowContainerType window_container_type,
|
|
const GURL& opener_url,
|
|
- const std::string& frame_name,
|
|
- const GURL& target_url) override {
|
|
+ const content::mojom::CreateNewWindowParams& params) override {
|
|
return true;
|
|
}
|
|
content::WebContents* CreateCustomWebContents(
|
|
diff --git a/components/embedder_support/android/delegate/web_contents_delegate_android.cc b/components/embedder_support/android/delegate/web_contents_delegate_android.cc
|
|
index 3f21268f5ce9c4fe908355e22172bb4dbd1e5834..cf6656a89a3fd6a0b2fe7e719947ea683824d4b5 100644
|
|
--- a/components/embedder_support/android/delegate/web_contents_delegate_android.cc
|
|
+++ b/components/embedder_support/android/delegate/web_contents_delegate_android.cc
|
|
@@ -182,14 +182,13 @@ bool WebContentsDelegateAndroid::IsWebContentsCreationOverridden(
|
|
content::SiteInstance* source_site_instance,
|
|
content::mojom::WindowContainerType window_container_type,
|
|
const GURL& opener_url,
|
|
- const std::string& frame_name,
|
|
- const GURL& target_url) {
|
|
+ const content::mojom::CreateNewWindowParams& params) {
|
|
JNIEnv* env = AttachCurrentThread();
|
|
ScopedJavaLocalRef<jobject> obj = GetJavaDelegate(env);
|
|
if (obj.is_null())
|
|
return false;
|
|
ScopedJavaLocalRef<jobject> java_gurl =
|
|
- url::GURLAndroid::FromNativeGURL(env, target_url);
|
|
+ url::GURLAndroid::FromNativeGURL(env, params.target_url.spec());
|
|
return !Java_WebContentsDelegateAndroid_shouldCreateWebContents(env, obj,
|
|
java_gurl);
|
|
}
|
|
diff --git a/components/embedder_support/android/delegate/web_contents_delegate_android.h b/components/embedder_support/android/delegate/web_contents_delegate_android.h
|
|
index ba32455887853f5ef146b3d24e7eeb1f5528ea50..188278c2bcf8a5a12733bd9b36ef1c459856ba47 100644
|
|
--- a/components/embedder_support/android/delegate/web_contents_delegate_android.h
|
|
+++ b/components/embedder_support/android/delegate/web_contents_delegate_android.h
|
|
@@ -82,8 +82,7 @@ class WebContentsDelegateAndroid : public content::WebContentsDelegate {
|
|
content::SiteInstance* source_site_instance,
|
|
content::mojom::WindowContainerType window_container_type,
|
|
const GURL& opener_url,
|
|
- const std::string& frame_name,
|
|
- const GURL& target_url) override;
|
|
+ const content::mojom::CreateNewWindowParams& params) override;
|
|
void CloseContents(content::WebContents* source) override;
|
|
void SetContentsBounds(content::WebContents* source,
|
|
const gfx::Rect& bounds) override;
|
|
diff --git a/components/offline_pages/content/background_loader/background_loader_contents.cc b/components/offline_pages/content/background_loader/background_loader_contents.cc
|
|
index 0f03e7eaa757b5445cdf4995d15085894d183259..722ae09871b40e765e738201259c49f05ef8597d 100644
|
|
--- a/components/offline_pages/content/background_loader/background_loader_contents.cc
|
|
+++ b/components/offline_pages/content/background_loader/background_loader_contents.cc
|
|
@@ -85,8 +85,7 @@ bool BackgroundLoaderContents::IsWebContentsCreationOverridden(
|
|
content::SiteInstance* source_site_instance,
|
|
content::mojom::WindowContainerType window_container_type,
|
|
const GURL& opener_url,
|
|
- const std::string& frame_name,
|
|
- const GURL& target_url) {
|
|
+ const content::mojom::CreateNewWindowParams& params) {
|
|
// Background pages should not create other webcontents/tabs.
|
|
return true;
|
|
}
|
|
diff --git a/components/offline_pages/content/background_loader/background_loader_contents.h b/components/offline_pages/content/background_loader/background_loader_contents.h
|
|
index c5b0d3b23b8da318ae55fcac2515a1187f261469..16ed1f46c9afde0ff25750128b4fcff6da639647 100644
|
|
--- a/components/offline_pages/content/background_loader/background_loader_contents.h
|
|
+++ b/components/offline_pages/content/background_loader/background_loader_contents.h
|
|
@@ -66,8 +66,7 @@ class BackgroundLoaderContents : public content::WebContentsDelegate {
|
|
content::SiteInstance* source_site_instance,
|
|
content::mojom::WindowContainerType window_container_type,
|
|
const GURL& opener_url,
|
|
- const std::string& frame_name,
|
|
- const GURL& target_url) override;
|
|
+ const content::mojom::CreateNewWindowParams& params) override;
|
|
|
|
void AddNewContents(content::WebContents* source,
|
|
std::unique_ptr<content::WebContents> new_contents,
|
|
diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc
|
|
index aa0841abdacb72309365f7abd5e7f78129798f0a..7e252a7017b3f6905627b6b8cd203dc2d9baf00b 100644
|
|
--- a/content/browser/web_contents/web_contents_impl.cc
|
|
+++ b/content/browser/web_contents/web_contents_impl.cc
|
|
@@ -4597,8 +4597,7 @@ FrameTree* WebContentsImpl::CreateNewWindow(
|
|
|
|
if (delegate_ && delegate_->IsWebContentsCreationOverridden(
|
|
source_site_instance, params.window_container_type,
|
|
- opener->GetLastCommittedURL(), params.frame_name,
|
|
- params.target_url)) {
|
|
+ opener->GetLastCommittedURL(), params)) {
|
|
auto* web_contents_impl =
|
|
static_cast<WebContentsImpl*>(delegate_->CreateCustomWebContents(
|
|
opener, source_site_instance, is_new_browsing_instance,
|
|
diff --git a/content/public/browser/web_contents_delegate.cc b/content/public/browser/web_contents_delegate.cc
|
|
index ef00a3636e7cbbff08365f140da58fef6522005c..685a8007072638ed8a21974e162a44900a2bdc80 100644
|
|
--- a/content/public/browser/web_contents_delegate.cc
|
|
+++ b/content/public/browser/web_contents_delegate.cc
|
|
@@ -140,8 +140,7 @@ bool WebContentsDelegate::IsWebContentsCreationOverridden(
|
|
SiteInstance* source_site_instance,
|
|
mojom::WindowContainerType window_container_type,
|
|
const GURL& opener_url,
|
|
- const std::string& frame_name,
|
|
- const GURL& target_url) {
|
|
+ const mojom::CreateNewWindowParams& params) {
|
|
return false;
|
|
}
|
|
|
|
diff --git a/content/public/browser/web_contents_delegate.h b/content/public/browser/web_contents_delegate.h
|
|
index f7bfa43693cff1a55a1e59950f1ecb06d67b8f3a..843111cdfd1364bae993fababd3fdea8334f5289 100644
|
|
--- a/content/public/browser/web_contents_delegate.h
|
|
+++ b/content/public/browser/web_contents_delegate.h
|
|
@@ -337,8 +337,7 @@ class CONTENT_EXPORT WebContentsDelegate {
|
|
SiteInstance* source_site_instance,
|
|
mojom::WindowContainerType window_container_type,
|
|
const GURL& opener_url,
|
|
- const std::string& frame_name,
|
|
- const GURL& target_url);
|
|
+ const mojom::CreateNewWindowParams& params);
|
|
|
|
// Allow delegate to creates a custom WebContents when
|
|
// WebContents::CreateNewWindow() is called. This function is only called
|
|
diff --git a/extensions/browser/guest_view/extension_options/extension_options_guest.cc b/extensions/browser/guest_view/extension_options/extension_options_guest.cc
|
|
index 4b927979ca27d4795d2629c9cd39b766823214d1..5ddb8fabc05e30ef22a76a0b7508c69271d20d91 100644
|
|
--- a/extensions/browser/guest_view/extension_options/extension_options_guest.cc
|
|
+++ b/extensions/browser/guest_view/extension_options/extension_options_guest.cc
|
|
@@ -218,8 +218,7 @@ bool ExtensionOptionsGuest::IsWebContentsCreationOverridden(
|
|
content::SiteInstance* source_site_instance,
|
|
content::mojom::WindowContainerType window_container_type,
|
|
const GURL& opener_url,
|
|
- const std::string& frame_name,
|
|
- const GURL& target_url) {
|
|
+ const content::mojom::CreateNewWindowParams& params) {
|
|
// This method handles opening links from within the guest. Since this guest
|
|
// view is used for displaying embedded extension options, we want any
|
|
// external links to be opened in a new tab, not in a new guest view so we
|
|
diff --git a/extensions/browser/guest_view/extension_options/extension_options_guest.h b/extensions/browser/guest_view/extension_options/extension_options_guest.h
|
|
index 8389455426d35b2d356c897f0f069ef1b1cba9e4..fede03e3f7df8ff45b8b3b2937a41ad7e066aa9e 100644
|
|
--- a/extensions/browser/guest_view/extension_options/extension_options_guest.h
|
|
+++ b/extensions/browser/guest_view/extension_options/extension_options_guest.h
|
|
@@ -65,8 +65,7 @@ class ExtensionOptionsGuest
|
|
content::SiteInstance* source_site_instance,
|
|
content::mojom::WindowContainerType window_container_type,
|
|
const GURL& opener_url,
|
|
- const std::string& frame_name,
|
|
- const GURL& target_url) final;
|
|
+ const content::mojom::CreateNewWindowParams& params) final;
|
|
content::WebContents* CreateCustomWebContents(
|
|
content::RenderFrameHost* opener,
|
|
content::SiteInstance* source_site_instance,
|
|
diff --git a/extensions/browser/guest_view/mime_handler_view/mime_handler_view_guest.cc b/extensions/browser/guest_view/mime_handler_view/mime_handler_view_guest.cc
|
|
index fad08e33e16e4408a295c3c0b755e9e050f4b48f..23fb05dac66b271ad465d548167fbd6b0bf355d9 100644
|
|
--- a/extensions/browser/guest_view/mime_handler_view/mime_handler_view_guest.cc
|
|
+++ b/extensions/browser/guest_view/mime_handler_view/mime_handler_view_guest.cc
|
|
@@ -389,8 +389,7 @@ bool MimeHandlerViewGuest::IsWebContentsCreationOverridden(
|
|
content::SiteInstance* source_site_instance,
|
|
content::mojom::WindowContainerType window_container_type,
|
|
const GURL& opener_url,
|
|
- const std::string& frame_name,
|
|
- const GURL& target_url) {
|
|
+ const content::mojom::CreateNewWindowParams& params) {
|
|
return true;
|
|
}
|
|
|
|
diff --git a/extensions/browser/guest_view/mime_handler_view/mime_handler_view_guest.h b/extensions/browser/guest_view/mime_handler_view/mime_handler_view_guest.h
|
|
index f0b71aba6dfb4682ce2e5b4c834b2526dcacb75c..d4b1857ca468ff97914d91d0c31298b73577547f 100644
|
|
--- a/extensions/browser/guest_view/mime_handler_view/mime_handler_view_guest.h
|
|
+++ b/extensions/browser/guest_view/mime_handler_view/mime_handler_view_guest.h
|
|
@@ -177,8 +177,7 @@ class MimeHandlerViewGuest
|
|
content::SiteInstance* source_site_instance,
|
|
content::mojom::WindowContainerType window_container_type,
|
|
const GURL& opener_url,
|
|
- const std::string& frame_name,
|
|
- const GURL& target_url) override;
|
|
+ const content::mojom::CreateNewWindowParams& params) override;
|
|
content::WebContents* CreateCustomWebContents(
|
|
content::RenderFrameHost* opener,
|
|
content::SiteInstance* source_site_instance,
|
|
diff --git a/fuchsia_web/webengine/browser/frame_impl.cc b/fuchsia_web/webengine/browser/frame_impl.cc
|
|
index 4d829cd24ec34d075c62b622e5e8fa836b7ae5f4..ab282d281e24ca9635c8f7d2753089d5b19649f9 100644
|
|
--- a/fuchsia_web/webengine/browser/frame_impl.cc
|
|
+++ b/fuchsia_web/webengine/browser/frame_impl.cc
|
|
@@ -574,8 +574,7 @@ bool FrameImpl::IsWebContentsCreationOverridden(
|
|
content::SiteInstance* source_site_instance,
|
|
content::mojom::WindowContainerType window_container_type,
|
|
const GURL& opener_url,
|
|
- const std::string& frame_name,
|
|
- const GURL& target_url) {
|
|
+ const content::mojom::CreateNewWindowParams& params) {
|
|
// Specify a generous upper bound for unacknowledged popup windows, so that we
|
|
// can catch bad client behavior while not interfering with normal operation.
|
|
constexpr size_t kMaxPendingWebContentsCount = 10;
|
|
diff --git a/fuchsia_web/webengine/browser/frame_impl.h b/fuchsia_web/webengine/browser/frame_impl.h
|
|
index ab81b9e60cd6334b8342a83bbffc588d256b54c7..eca73c0305617e98cc10568de036c7e73f97f31c 100644
|
|
--- a/fuchsia_web/webengine/browser/frame_impl.h
|
|
+++ b/fuchsia_web/webengine/browser/frame_impl.h
|
|
@@ -306,8 +306,7 @@ class WEB_ENGINE_EXPORT FrameImpl : public fuchsia::web::Frame,
|
|
content::SiteInstance* source_site_instance,
|
|
content::mojom::WindowContainerType window_container_type,
|
|
const GURL& opener_url,
|
|
- const std::string& frame_name,
|
|
- const GURL& target_url) override;
|
|
+ const content::mojom::CreateNewWindowParams& params) override;
|
|
void WebContentsCreated(content::WebContents* source_contents,
|
|
int opener_render_process_id,
|
|
int opener_render_frame_id,
|
|
diff --git a/headless/lib/browser/headless_web_contents_impl.cc b/headless/lib/browser/headless_web_contents_impl.cc
|
|
index 602ce992279f95d9a5926cb7bf5db485215d331f..44cf33b9602581b3b46d54789933b20953849b8f 100644
|
|
--- a/headless/lib/browser/headless_web_contents_impl.cc
|
|
+++ b/headless/lib/browser/headless_web_contents_impl.cc
|
|
@@ -195,8 +195,7 @@ class HeadlessWebContentsImpl::Delegate : public content::WebContentsDelegate {
|
|
content::SiteInstance* source_site_instance,
|
|
content::mojom::WindowContainerType window_container_type,
|
|
const GURL& opener_url,
|
|
- const std::string& frame_name,
|
|
- const GURL& target_url) override {
|
|
+ const content::mojom::CreateNewWindowParams& params) override {
|
|
return headless_web_contents_->browser_context()
|
|
->options()
|
|
->block_new_web_contents();
|
|
diff --git a/ui/views/controls/webview/web_dialog_view.cc b/ui/views/controls/webview/web_dialog_view.cc
|
|
index a0b515b6e8ac360063790c56f8912051c506f6b8..d1cb266f888548ab13b676c8443c4a14622165b3 100644
|
|
--- a/ui/views/controls/webview/web_dialog_view.cc
|
|
+++ b/ui/views/controls/webview/web_dialog_view.cc
|
|
@@ -448,8 +448,7 @@ bool WebDialogView::IsWebContentsCreationOverridden(
|
|
content::SiteInstance* source_site_instance,
|
|
content::mojom::WindowContainerType window_container_type,
|
|
const GURL& opener_url,
|
|
- const std::string& frame_name,
|
|
- const GURL& target_url) {
|
|
+ const content::mojom::CreateNewWindowParams& params) {
|
|
if (delegate_)
|
|
return delegate_->HandleShouldOverrideWebContentsCreation();
|
|
return false;
|
|
diff --git a/ui/views/controls/webview/web_dialog_view.h b/ui/views/controls/webview/web_dialog_view.h
|
|
index e4dd6b6acab981a3c7f1bd354932cbf57281809e..a42e4aa7f8195130b7374272f01989754633a1b6 100644
|
|
--- a/ui/views/controls/webview/web_dialog_view.h
|
|
+++ b/ui/views/controls/webview/web_dialog_view.h
|
|
@@ -165,8 +165,7 @@ class WEBVIEW_EXPORT WebDialogView : public ClientView,
|
|
content::SiteInstance* source_site_instance,
|
|
content::mojom::WindowContainerType window_container_type,
|
|
const GURL& opener_url,
|
|
- const std::string& frame_name,
|
|
- const GURL& target_url) override;
|
|
+ const content::mojom::CreateNewWindowParams& params) override;
|
|
void RequestMediaAccessPermission(
|
|
content::WebContents* web_contents,
|
|
const content::MediaStreamRequest& request,
|