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

Unified Diff: content/browser/service_worker/service_worker_version.cc

Issue 1269923003: Plumb notification action index for desktop SW notificationclick (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@actions
Patch Set: Created 5 years, 4 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/browser/service_worker/service_worker_version.cc
diff --git a/content/browser/service_worker/service_worker_version.cc b/content/browser/service_worker/service_worker_version.cc
index 4ff04c857432753bc401bbddd9d79c32c7117b1a..03b15bb0d2897fa0ce54811df848d175a00c80dc 100644
--- a/content/browser/service_worker/service_worker_version.cc
+++ b/content/browser/service_worker/service_worker_version.cc
@@ -826,7 +826,8 @@ void ServiceWorkerVersion::DispatchSyncEvent(SyncRegistrationPtr registration,
void ServiceWorkerVersion::DispatchNotificationClickEvent(
const StatusCallback& callback,
int64_t persistent_notification_id,
- const PlatformNotificationData& notification_data) {
+ const PlatformNotificationData& notification_data,
+ int action_index) {
DCHECK_EQ(ACTIVATED, status()) << status();
if (running_status() != RUNNING) {
// Schedule calling this method after starting the worker.
@@ -834,7 +835,8 @@ void ServiceWorkerVersion::DispatchNotificationClickEvent(
&RunTaskAfterStartWorker, weak_factory_.GetWeakPtr(), callback,
base::Bind(&self::DispatchNotificationClickEvent,
weak_factory_.GetWeakPtr(), callback,
- persistent_notification_id, notification_data)));
+ persistent_notification_id, notification_data,
+ action_index)));
return;
}
@@ -842,7 +844,8 @@ void ServiceWorkerVersion::DispatchNotificationClickEvent(
REQUEST_NOTIFICATION_CLICK);
ServiceWorkerStatusCode status =
embedded_worker_->SendMessage(ServiceWorkerMsg_NotificationClickEvent(
- request_id, persistent_notification_id, notification_data));
+ request_id, persistent_notification_id, notification_data,
+ action_index));
if (status != SERVICE_WORKER_OK) {
notification_click_requests_.Remove(request_id);
RunSoon(base::Bind(callback, status));

Powered by Google App Engine
This is Rietveld 408576698