Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(160)

Unified Diff: content/renderer/service_worker/service_worker_context_client.h

Issue 1904163002: Move Web Notifications to use Mojo Base URL: https://chromium.googlesource.com/chromium/src.git@skbitmap-blink
Patch Set: it works \o/ Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: content/renderer/service_worker/service_worker_context_client.h
diff --git a/content/renderer/service_worker/service_worker_context_client.h b/content/renderer/service_worker/service_worker_context_client.h
index 4d1c31a891b054dfde4cd50f612b153d546cd4a4..bd27969c765f06d75c570c42da4db5bae346a946 100644
--- a/content/renderer/service_worker/service_worker_context_client.h
+++ b/content/renderer/service_worker/service_worker_context_client.h
@@ -52,7 +52,6 @@ class Message;
namespace content {
-struct PlatformNotificationData;
struct PushEventPayload;
struct ServiceWorkerClientInfo;
class ServiceWorkerProviderContext;
@@ -65,7 +64,8 @@ class WebServiceWorkerRegistrationImpl;
class ServiceWorkerContextClient
: public blink::WebServiceWorkerContextClient {
public:
- using SyncCallback = mojo::Callback<void(mojom::ServiceWorkerEventStatus)>;
+ using MojoStatusCallback =
+ mojo::Callback<void(mojom::ServiceWorkerEventStatus)>;
// Returns a thread-specific client instance. This does NOT create a
// new instance.
@@ -174,10 +174,19 @@ class ServiceWorkerContextClient
const blink::WebVector<blink::WebURL>& sub_scopes,
const blink::WebVector<blink::WebSecurityOrigin>& origins) override;
- virtual void DispatchSyncEvent(
+ void DispatchSyncEvent(
const std::string& tag,
blink::WebServiceWorkerContextProxy::LastChanceOption last_chance,
- const SyncCallback& callback);
+ const MojoStatusCallback& callback);
+
+ void DispatchNotificationClickEvent(
+ blink::mojom::blink::NotificationPtr notification,
+ int32_t action_index,
+ const MojoStatusCallback& callback);
+
+ void DispatchNotificationCloseEvent(
+ blink::mojom::blink::NotificationPtr notification,
+ const MojoStatusCallback& callback);
private:
struct WorkerContextData;
@@ -198,16 +207,7 @@ class ServiceWorkerContextClient
const ServiceWorkerMsg_ExtendableMessageEvent_Params& params);
void OnInstallEvent(int request_id);
void OnFetchEvent(int request_id, const ServiceWorkerFetchRequest& request);
- void OnNotificationClickEvent(
- int request_id,
- int64_t persistent_notification_id,
- const PlatformNotificationData& notification_data,
- int action_index);
void OnPushEvent(int request_id, const PushEventPayload& payload);
- void OnNotificationCloseEvent(
- int request_id,
- int64_t persistent_notification_id,
- const PlatformNotificationData& notification_data);
void OnGeofencingEvent(int request_id,
blink::WebGeofencingEventType event_type,
const std::string& region_id,

Powered by Google App Engine
This is Rietveld 408576698