Commit 146fc8cf authored by Mario Sanchez Prada's avatar Mario Sanchez Prada Committed by Commit Bot

Removed unused |render_frame_id| from mojom::PushMessaging::Subscribe()

We now use DocumentInterfaceBroker to communicate with the RenderFrame
in the browser process, so we don't need to pass a routing ID for the
render frame anymore.

This CL removes the parameter and all its references from callsites,
which were already passing -1 (invalid ID) anyway.

Bug: 939943
Change-Id: I3cecd93de28feff24722a7870673225512dfd8ba
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1638545
Commit-Queue: Mario Sanchez Prada <mario@igalia.com>
Reviewed-by: default avatarPeter Beverloo <peter@chromium.org>
Reviewed-by: default avatarKentaro Hara <haraken@chromium.org>
Reviewed-by: default avatarDominick Ng <dominickn@chromium.org>
Cr-Commit-Position: refs/heads/master@{#666254}
parent 0d42960a
...@@ -302,7 +302,6 @@ void PushMessagingManager::BindRequest( ...@@ -302,7 +302,6 @@ void PushMessagingManager::BindRequest(
// ----------------------------------------------------------------------------- // -----------------------------------------------------------------------------
void PushMessagingManager::Subscribe( void PushMessagingManager::Subscribe(
int32_t render_frame_id,
int64_t service_worker_registration_id, int64_t service_worker_registration_id,
const blink::WebPushSubscriptionOptions& options, const blink::WebPushSubscriptionOptions& options,
bool user_gesture, bool user_gesture,
......
...@@ -50,8 +50,7 @@ class PushMessagingManager : public blink::mojom::PushMessaging { ...@@ -50,8 +50,7 @@ class PushMessagingManager : public blink::mojom::PushMessaging {
} }
// blink::mojom::PushMessaging impl, run on IO thread. // blink::mojom::PushMessaging impl, run on IO thread.
void Subscribe(int32_t render_frame_id, void Subscribe(int64_t service_worker_registration_id,
int64_t service_worker_registration_id,
const blink::WebPushSubscriptionOptions& options, const blink::WebPushSubscriptionOptions& options,
bool user_gesture, bool user_gesture,
SubscribeCallback callback) override; SubscribeCallback callback) override;
......
...@@ -26,8 +26,7 @@ enum PushErrorType { ...@@ -26,8 +26,7 @@ enum PushErrorType {
}; };
interface PushMessaging { interface PushMessaging {
Subscribe(int32 render_frame_id, Subscribe(int64 service_worker_registration_id,
int64 service_worker_registration_id,
PushSubscriptionOptions options, PushSubscriptionOptions options,
bool user_gesture) bool user_gesture)
=> (PushRegistrationStatus status, => (PushRegistrationStatus status,
......
...@@ -121,12 +121,8 @@ void PushMessagingClient::DoSubscribe( ...@@ -121,12 +121,8 @@ void PushMessagingClient::DoSubscribe(
return; return;
} }
// We use DocumentInterfaceBroker to communicate with the RenderFrame in the
// browser process now, so we don't need to pass a valid ID from here anymore.
// TODO: Remove the extra parameter |render_frame_id| from the mojo interface.
GetService()->Subscribe( GetService()->Subscribe(
-1 /* Invalid ID */, service_worker_registration_id, std::move(options), service_worker_registration_id, std::move(options), user_gesture,
user_gesture,
WTF::Bind(&PushMessagingClient::DidSubscribe, WrapPersistent(this), WTF::Bind(&PushMessagingClient::DidSubscribe, WrapPersistent(this),
std::move(callbacks))); std::move(callbacks)));
} }
......
...@@ -91,8 +91,8 @@ void PushProvider::Subscribe( ...@@ -91,8 +91,8 @@ void PushProvider::Subscribe(
mojom::blink::PushSubscriptionOptions::From(&options); mojom::blink::PushSubscriptionOptions::From(&options);
push_messaging_manager_->Subscribe( push_messaging_manager_->Subscribe(
-1 /* Invalid ID */, GetSupplementable()->RegistrationId(), GetSupplementable()->RegistrationId(), std::move(content_options_ptr),
std::move(content_options_ptr), user_gesture, user_gesture,
WTF::Bind(&PushProvider::DidSubscribe, WrapPersistent(this), WTF::Bind(&PushProvider::DidSubscribe, WrapPersistent(this),
WTF::Passed(std::move(callbacks)))); WTF::Passed(std::move(callbacks))));
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment