9b0409f7c9
* chore: bump chromium in DEPS to 125.0.6421.0 * chore: bump chromium in DEPS to 125.0.6422.0 * Add ENABLE_BASE_TRACING flags for compatibility with enable_base_tracing = false on Windows https://chromium-review.googlesource.com/c/chromium/src/+/5434658 * chore: update patches * fixup: Add ENABLE_BASE_TRACING flags for compatibility with enable_base_tracing = false on Windows * chore: bump chromium in DEPS to 126.0.6423.0 * chore: update patches * 5426599: Next generation control of unsafe-buffers-usage plugin https://chromium-review.googlesource.com/c/chromium/src/+/5426599 * chore: bump chromium in DEPS to 126.0.6425.0 * chore: update patches * Roll clang+rust llvmorg-19-init-7229-g315c88c5-2 : llvmorg-19-init-8091-gab037c4f-1 / ceab6128fa48a616bfd3e3adf4bc80133b8ee223-1 : ab71ee7a9214c2793108a41efb065aa77aeb7326-1 https://chromium-review.googlesource.com/c/chromium/src/+/5444328 Also see https://issues.chromium.org/issues/332931387 * 5445074: [Views AX] Move AXEventNotificationDetails to ui/accessibility/ https://chromium-review.googlesource.com/c/chromium/src/+/5445074 Also 5455993: [Views AX] Rename AXEventNotificationDetails to AXUpdatesAndEvents | https://chromium-review.googlesource.com/c/chromium/src/+/5455993 * Pass IsolationInfo to ContentBrowserClient::WillCreateURLLoaderFactory() https://chromium-review.googlesource.com/c/chromium/src/+/5405301 * chore: bump chromium in DEPS to 126.0.6427.0 * chore: update patches * chore: remove no longer needed patch perfetto is now turned on so this patch is no longer needed. * chore: bump chromium in DEPS to 126.0.6429.0 * chore: bump chromium in DEPS to 126.0.6431.0 * chore: bump chromium in DEPS to 126.0.6433.0 * 5466654: Do not create a console if logging to a handle https://chromium-review.googlesource.com/c/chromium/src/+/5466654 * chore: fixup patch indices * Address Linux NonClientFrameView Changes - https://chromium-review.googlesource.com/c/chromium/src/+/5180720 - https://chromium-review.googlesource.com/c/chromium/src/+/5367794 * chore: bump chromium in DEPS to 126.0.6435.0 * chore: bump chromium in DEPS to 126.0.6437.0 * chore: update patches * chore: bump chromium in DEPS to 126.0.6439.0 * chore: bump chromium in DEPS to 126.0.6441.0 * 5477689: components/crash/content/tools: Format with yapf | https://chromium-review.googlesource.com/c/chromium/src/+/5477689 * 5485006: Remove enable_print_content_analysis GN flag | https://chromium-review.googlesource.com/c/chromium/src/+/5485006 * chore: update chromium patches * chore: bump chromium in DEPS to 126.0.6443.0 * 5465608: Convert DCHECKs near RenderWidgetHost, DelegatedFrameHost to CHECK | https://chromium-review.googlesource.com/c/chromium/src/+/5465608 * 5492605: Migrate TODOs referencing old crbug IDs to the new issue tracker IDs | https://chromium-review.googlesource.com/c/chromium/src/+/5492605 * chore: update patches * chore: bump chromium in DEPS to 126.0.6445.0 * chore: update patches * 5468588: Fullscreen: Encapsulate ExclusiveAccessBubble params in a struct | https://chromium-review.googlesource.com/c/chromium/src/+/5468588 * fixup! 5485006: Remove enable_print_content_analysis GN flag | https://chromium-review.googlesource.com/c/chromium/src/+/5485006 * 5461340: `size_t` in `mojo::DataPipe[Consumer|Producer]Handle`: /components. | https://chromium-review.googlesource.com/c/chromium/src/+/5461340 * 5480213: Add an EvictIds struct to FrameEvictorClient | https://chromium-review.googlesource.com/c/chromium/src/+/5480213 * 4341506: [api] Deprecate Isolate::IdleNotificationDeadline | https://chromium-review.googlesource.com/c/v8/v8/+/4341506 * 5300826: [v8-tasks] Add source location to v8::TaskRunner, step 4/4. | https://chromium-review.googlesource.com/c/v8/v8/+/5300826 * partially revert is_newly_created to allow for browser initiated about:blank loads * add dep on app_launch_prefetch Ref: https://chromium-review.googlesource.com/c/chromium/src/+/5420149 * install sysroots from electron not from chrome We should add a new var upstream for `download_sysroots` so that we can skip downloading chromes at all. Ref: https://chromium-review.googlesource.com/c/chromium/src/+/5462469 * refactor: make UpdateFrameHints an override Ref: https://chromium-review.googlesource.com/c/chromium/src/+/5473548 * fix ppapi * refactor: update namespace for pwm switches Ref: https://chromium-review.googlesource.com/c/chromium/src/+/5444617 * 5459367: WebSQL: Restrict WebSQL service creation to Android only | https://chromium-review.googlesource.com/c/chromium/src/+/5459367 * 5455853: Revert "[Clipboard] Don't add meta charset tag for async write() method on Mac." | https://chromium-review.googlesource.com/c/chromium/src/+/5455853 * fixup! refactor: update namespace for pwm switches edd9e26 Ref: https://chromium-review.googlesource.com/c/chromium/src/+/5444617 * 5147611: [heap] Add checks for ensuring position info slow path is not used in heap snapshot | https://chromium-review.googlesource.com/c/v8/v8/+/5147611 * fixup! 5412666: [heap] Also avoid heap allocation for allocation tracked functions | https://chromium-review.googlesource.com/c/v8/v8/+/5412666 * chore: add websql removal to breaking-changes.md --------- Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com> Co-authored-by: John Kleinschmidt <jkleinsc@electronjs.org> Co-authored-by: PatchUp <73610968+patchup[bot]@users.noreply.github.com> Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com> Co-authored-by: VerteDinde <vertedinde@electronjs.org> Co-authored-by: Keeley Hammond <khammond@slack-corp.com> Co-authored-by: Samuel Attard <marshallofsound@electronjs.org>
201 lines
11 KiB
Diff
201 lines
11 KiB
Diff
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
From: Jeremy Apthorp <jeremya@chromium.org>
|
|
Date: Fri, 5 Oct 2018 14:22:06 -0700
|
|
Subject: notification_provenance.patch
|
|
|
|
Pass RenderFrameHost through to PlatformNotificationService
|
|
so Electron can identify which renderer a notification came from.
|
|
|
|
diff --git a/chrome/browser/notifications/platform_notification_service_impl.cc b/chrome/browser/notifications/platform_notification_service_impl.cc
|
|
index 738563f512ac818c0c05b6617bd90ac40a50bf37..08dd8bd95b6beaf30f65bda0d0ca0e799fee1cf8 100644
|
|
--- a/chrome/browser/notifications/platform_notification_service_impl.cc
|
|
+++ b/chrome/browser/notifications/platform_notification_service_impl.cc
|
|
@@ -198,6 +198,7 @@ bool PlatformNotificationServiceImpl::WasClosedProgrammatically(
|
|
|
|
// TODO(awdf): Rename to DisplayNonPersistentNotification (Similar for Close)
|
|
void PlatformNotificationServiceImpl::DisplayNotification(
|
|
+ content::RenderFrameHost* render_frame_host,
|
|
const std::string& notification_id,
|
|
const GURL& origin,
|
|
const GURL& document_url,
|
|
diff --git a/chrome/browser/notifications/platform_notification_service_impl.h b/chrome/browser/notifications/platform_notification_service_impl.h
|
|
index 231a266a4c8d8a729baa701c47cb19348e199f79..8828b216e515d557e381549f1253f48e24342c33 100644
|
|
--- a/chrome/browser/notifications/platform_notification_service_impl.h
|
|
+++ b/chrome/browser/notifications/platform_notification_service_impl.h
|
|
@@ -57,6 +57,7 @@ class PlatformNotificationServiceImpl
|
|
|
|
// content::PlatformNotificationService implementation.
|
|
void DisplayNotification(
|
|
+ content::RenderFrameHost* render_frame_host,
|
|
const std::string& notification_id,
|
|
const GURL& origin,
|
|
const GURL& document_url,
|
|
diff --git a/content/browser/notifications/blink_notification_service_impl.cc b/content/browser/notifications/blink_notification_service_impl.cc
|
|
index 027ba5088355441ed2dd1abe563277df7c1d3737..65837dcf0c2cd0bcc0c000fc3fe5eb2ddd6f7b5f 100644
|
|
--- a/content/browser/notifications/blink_notification_service_impl.cc
|
|
+++ b/content/browser/notifications/blink_notification_service_impl.cc
|
|
@@ -87,12 +87,14 @@ BlinkNotificationServiceImpl::BlinkNotificationServiceImpl(
|
|
BrowserContext* browser_context,
|
|
scoped_refptr<ServiceWorkerContextWrapper> service_worker_context,
|
|
RenderProcessHost* render_process_host,
|
|
+ RenderFrameHost* render_frame_host,
|
|
const blink::StorageKey& storage_key,
|
|
const GURL& document_url,
|
|
const WeakDocumentPtr& weak_document_ptr,
|
|
RenderProcessHost::NotificationServiceCreatorType creator_type,
|
|
mojo::PendingReceiver<blink::mojom::NotificationService> receiver)
|
|
: notification_context_(notification_context),
|
|
+ render_frame_host_(render_frame_host),
|
|
browser_context_(browser_context),
|
|
service_worker_context_(std::move(service_worker_context)),
|
|
render_process_host_id_(render_process_host->GetID()),
|
|
@@ -184,7 +186,7 @@ void BlinkNotificationServiceImpl::DisplayNonPersistentNotification(
|
|
creator_type_);
|
|
|
|
browser_context_->GetPlatformNotificationService()->DisplayNotification(
|
|
- notification_id, storage_key_.origin().GetURL(), document_url_,
|
|
+ render_frame_host_, notification_id, storage_key_.origin().GetURL(), document_url_,
|
|
platform_notification_data, notification_resources);
|
|
}
|
|
|
|
diff --git a/content/browser/notifications/blink_notification_service_impl.h b/content/browser/notifications/blink_notification_service_impl.h
|
|
index e7cc73f375ada7ee8715d331c3d372e0f59a0cdf..c0a142bea4a9a30c10dbb30c72fedce9ab4d1e62 100644
|
|
--- a/content/browser/notifications/blink_notification_service_impl.h
|
|
+++ b/content/browser/notifications/blink_notification_service_impl.h
|
|
@@ -44,6 +44,7 @@ class CONTENT_EXPORT BlinkNotificationServiceImpl
|
|
BrowserContext* browser_context,
|
|
scoped_refptr<ServiceWorkerContextWrapper> service_worker_context,
|
|
RenderProcessHost* render_process_host,
|
|
+ RenderFrameHost* render_frame_host,
|
|
const blink::StorageKey& storage_key,
|
|
const GURL& document_url,
|
|
const WeakDocumentPtr& weak_document_ptr,
|
|
@@ -113,6 +114,7 @@ class CONTENT_EXPORT BlinkNotificationServiceImpl
|
|
raw_ptr<PlatformNotificationContextImpl, DanglingUntriaged>
|
|
notification_context_;
|
|
|
|
+ raw_ptr<RenderFrameHost> render_frame_host_;
|
|
raw_ptr<BrowserContext> browser_context_;
|
|
|
|
scoped_refptr<ServiceWorkerContextWrapper> service_worker_context_;
|
|
diff --git a/content/browser/notifications/blink_notification_service_impl_unittest.cc b/content/browser/notifications/blink_notification_service_impl_unittest.cc
|
|
index c5413ab0ccd97092a12e594866d0594470b94ca4..6f74216cb04b293e182c1e8a3d14f6627fd23649 100644
|
|
--- a/content/browser/notifications/blink_notification_service_impl_unittest.cc
|
|
+++ b/content/browser/notifications/blink_notification_service_impl_unittest.cc
|
|
@@ -132,7 +132,7 @@ class BlinkNotificationServiceImplTest : public ::testing::Test {
|
|
notification_service_ = std::make_unique<BlinkNotificationServiceImpl>(
|
|
notification_context_.get(), &browser_context_,
|
|
embedded_worker_helper_->context_wrapper(), &render_process_host_,
|
|
- storage_key_,
|
|
+ nullptr, storage_key_,
|
|
/*document_url=*/GURL(),
|
|
contents_.get()->GetPrimaryMainFrame()->GetWeakDocumentPtr(),
|
|
RenderProcessHost::NotificationServiceCreatorType::kDocument,
|
|
diff --git a/content/browser/notifications/platform_notification_context_impl.cc b/content/browser/notifications/platform_notification_context_impl.cc
|
|
index 43b492ef0d3fa49f51acc77b4600698375f2a28c..3a3102d6dd945879f45638cfac8f32409fc5e96d 100644
|
|
--- a/content/browser/notifications/platform_notification_context_impl.cc
|
|
+++ b/content/browser/notifications/platform_notification_context_impl.cc
|
|
@@ -268,6 +268,7 @@ void PlatformNotificationContextImpl::Shutdown() {
|
|
|
|
void PlatformNotificationContextImpl::CreateService(
|
|
RenderProcessHost* render_process_host,
|
|
+ RenderFrameHost* render_frame_host,
|
|
const blink::StorageKey& storage_key,
|
|
const GURL& document_url,
|
|
const WeakDocumentPtr& weak_document_ptr,
|
|
@@ -276,7 +277,7 @@ void PlatformNotificationContextImpl::CreateService(
|
|
DCHECK_CURRENTLY_ON(BrowserThread::UI);
|
|
services_.push_back(std::make_unique<BlinkNotificationServiceImpl>(
|
|
this, browser_context_, service_worker_context_, render_process_host,
|
|
- storage_key, document_url, weak_document_ptr, creator_type,
|
|
+ render_frame_host, storage_key, document_url, weak_document_ptr, creator_type,
|
|
std::move(receiver)));
|
|
}
|
|
|
|
diff --git a/content/browser/notifications/platform_notification_context_impl.h b/content/browser/notifications/platform_notification_context_impl.h
|
|
index 38c8cf36fdf9366121c7ada96c167a4c9664952e..03b37fb62655a355e104870a088e4222932bdc17 100644
|
|
--- a/content/browser/notifications/platform_notification_context_impl.h
|
|
+++ b/content/browser/notifications/platform_notification_context_impl.h
|
|
@@ -47,6 +47,7 @@ class PlatformNotificationServiceProxy;
|
|
class RenderProcessHost;
|
|
class ServiceWorkerContextWrapper;
|
|
class WeakDocumentPtr;
|
|
+class RenderFrameHost;
|
|
|
|
// Implementation of the Web Notification storage context. The public methods
|
|
// defined in this interface must only be called on the UI thread.
|
|
@@ -80,6 +81,7 @@ class CONTENT_EXPORT PlatformNotificationContextImpl
|
|
// service is created by a dedicated worker, or is `nullptr` otherwise.
|
|
void CreateService(
|
|
RenderProcessHost* render_process_host,
|
|
+ RenderFrameHost* render_frame_host,
|
|
const blink::StorageKey& storage_key,
|
|
const GURL& document_url,
|
|
const WeakDocumentPtr& weak_document_ptr,
|
|
diff --git a/content/browser/renderer_host/render_process_host_impl.cc b/content/browser/renderer_host/render_process_host_impl.cc
|
|
index 9d2105bbe450961fcae3b8a6811911a0fa401f52..336cebf1aee3659f881b8edb8b9370860520c9bd 100644
|
|
--- a/content/browser/renderer_host/render_process_host_impl.cc
|
|
+++ b/content/browser/renderer_host/render_process_host_impl.cc
|
|
@@ -2043,7 +2043,7 @@ void RenderProcessHostImpl::CreateNotificationService(
|
|
case RenderProcessHost::NotificationServiceCreatorType::kSharedWorker:
|
|
case RenderProcessHost::NotificationServiceCreatorType::kDedicatedWorker: {
|
|
storage_partition_impl_->GetPlatformNotificationContext()->CreateService(
|
|
- this, storage_key, /*document_url=*/GURL(), weak_document_ptr,
|
|
+ this, rfh, storage_key, /*document_url=*/GURL(), weak_document_ptr,
|
|
creator_type, std::move(receiver));
|
|
break;
|
|
}
|
|
@@ -2051,7 +2051,7 @@ void RenderProcessHostImpl::CreateNotificationService(
|
|
CHECK(rfh);
|
|
|
|
storage_partition_impl_->GetPlatformNotificationContext()->CreateService(
|
|
- this, storage_key, rfh->GetLastCommittedURL(), weak_document_ptr,
|
|
+ this, rfh, storage_key, rfh->GetLastCommittedURL(), weak_document_ptr,
|
|
creator_type, std::move(receiver));
|
|
break;
|
|
}
|
|
diff --git a/content/public/browser/platform_notification_service.h b/content/public/browser/platform_notification_service.h
|
|
index 82db1db4175fb9f4ee7490d5a163164ef4495ecb..4f51683be14ba6ee657a290c7747969e052a88ca 100644
|
|
--- a/content/public/browser/platform_notification_service.h
|
|
+++ b/content/public/browser/platform_notification_service.h
|
|
@@ -26,6 +26,8 @@ struct PlatformNotificationData;
|
|
|
|
namespace content {
|
|
|
|
+class RenderFrameHost;
|
|
+
|
|
// The service using which notifications can be presented to the user. There
|
|
// should be a unique instance of the PlatformNotificationService depending
|
|
// on the browsing context being used.
|
|
@@ -41,6 +43,7 @@ class CONTENT_EXPORT PlatformNotificationService {
|
|
// This method must be called on the UI thread. |document_url| is empty when
|
|
// the display notification originates from a worker.
|
|
virtual void DisplayNotification(
|
|
+ RenderFrameHost* render_frame_host,
|
|
const std::string& notification_id,
|
|
const GURL& origin,
|
|
const GURL& document_url,
|
|
diff --git a/content/test/mock_platform_notification_service.cc b/content/test/mock_platform_notification_service.cc
|
|
index 32a0cf38389989d3e1c287ad4a3f26b6d3615370..8a788f243e913ef26246b5ea4ac4ac5c1dfc4b86 100644
|
|
--- a/content/test/mock_platform_notification_service.cc
|
|
+++ b/content/test/mock_platform_notification_service.cc
|
|
@@ -29,6 +29,7 @@ MockPlatformNotificationService::MockPlatformNotificationService(
|
|
MockPlatformNotificationService::~MockPlatformNotificationService() = default;
|
|
|
|
void MockPlatformNotificationService::DisplayNotification(
|
|
+ RenderFrameHost* render_frame_host,
|
|
const std::string& notification_id,
|
|
const GURL& origin,
|
|
const GURL& document_url,
|
|
diff --git a/content/test/mock_platform_notification_service.h b/content/test/mock_platform_notification_service.h
|
|
index 5e91d867ba1b04358ecb670ba407adc65793b417..a0c5eaafd9ec2242927fe9170e9acd4069f654a0 100644
|
|
--- a/content/test/mock_platform_notification_service.h
|
|
+++ b/content/test/mock_platform_notification_service.h
|
|
@@ -53,6 +53,7 @@ class MockPlatformNotificationService : public PlatformNotificationService {
|
|
|
|
// PlatformNotificationService implementation.
|
|
void DisplayNotification(
|
|
+ RenderFrameHost* render_frame_host,
|
|
const std::string& notification_id,
|
|
const GURL& origin,
|
|
const GURL& document_url,
|