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

Issue 1619703002: Implement notificationclose event (Closed)

Created:
4 years, 11 months ago by Nina
Modified:
4 years, 10 months ago
CC:
blink-reviews, blink-reviews-api_chromium.org, blink-worker-reviews_chromium.org, chromium-reviews, darin-cc_chromium.org, dglazkov+blink, falken, horo+watch_chromium.org, jam, jsbell+serviceworker_chromium.org, kinuko+serviceworker, kinuko+watch, michaeln, mkwst+moarreviews-renderer_chromium.org, mlamouri+watch-content_chromium.org, mlamouri+watch-notifications_chromium.org, nhiroki, Peter Beverloo, serviceworker-reviews, tzik
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Implement notificationclose event This patch introduces a notificationclose event fired in the service worker when a notification has been closed by the user. Layout tests to come in a follow-up patch: https://codereview.chromium.org/1656823002/ Intent to Implement and Ship: https://groups.google.com/a/chromium.org/forum/#!topic/blink-dev/fePanzKy6ec BUG=579150 TEST=PlatformNotificationServiceBrowserTest.UserClosesPersistentNotification Committed: https://crrev.com/2f82b23b3572d1fb653d971ee9b5e0232c4b37e5 Cr-Commit-Position: refs/heads/master@{#373799}

Patch Set 1 #

Patch Set 2 : Removed some logging statements #

Total comments: 3

Patch Set 3 : Removed redundant TODO #

Total comments: 16

Patch Set 4 : Addressed comments #

Total comments: 16

Patch Set 5 : Comments, rebase, simple test #

Total comments: 1

Patch Set 6 : Recovered a lost piece of logging. #

Total comments: 18

Patch Set 7 : Fixed comments, added metrics. #

Patch Set 8 : Trivial rebase #

Total comments: 12

Patch Set 9 : Addressed comments #

Patch Set 10 : Fixed test expectations and compile error #

Total comments: 5

Patch Set 11 : Fixed nits #

Unified diffs Side-by-side diffs Delta from patch set Stats (+380 lines, -119 lines) Patch
M chrome/browser/notifications/platform_notification_service_browsertest.cc View 1 2 3 4 5 6 7 8 1 chunk +17 lines, -0 lines 0 comments Download
M chrome/browser/notifications/platform_notification_service_impl.cc View 1 2 3 4 5 6 7 8 9 10 3 chunks +16 lines, -26 lines 0 comments Download
M chrome/test/data/notifications/platform_notification_service.js View 1 2 3 4 1 chunk +6 lines, -0 lines 0 comments Download
M content/browser/notifications/notification_event_dispatcher_impl.h View 1 2 3 4 2 chunks +10 lines, -2 lines 0 comments Download
M content/browser/notifications/notification_event_dispatcher_impl.cc View 1 2 3 4 5 6 7 8 9 10 7 chunks +211 lines, -83 lines 0 comments Download
M content/browser/service_worker/service_worker_metrics.h View 1 2 3 4 1 chunk +1 line, -0 lines 0 comments Download
M content/browser/service_worker/service_worker_metrics.cc View 1 2 3 4 5 6 7 8 9 10 2 chunks +6 lines, -0 lines 0 comments Download
M content/common/service_worker/service_worker_messages.h View 1 2 3 4 5 6 7 8 9 10 2 chunks +7 lines, -0 lines 0 comments Download
M content/public/browser/notification_event_dispatcher.h View 1 2 3 4 5 6 7 8 9 10 2 chunks +14 lines, -2 lines 0 comments Download
M content/renderer/service_worker/service_worker_context_client.h View 1 2 3 4 5 6 7 8 9 10 2 chunks +7 lines, -0 lines 0 comments Download
M content/renderer/service_worker/service_worker_context_client.cc View 1 2 3 4 5 6 7 8 9 10 3 chunks +20 lines, -0 lines 0 comments Download
M third_party/WebKit/LayoutTests/http/tests/serviceworker/webexposed/global-interface-listing-service-worker-expected.txt View 1 2 3 4 5 6 7 8 9 10 2 chunks +2 lines, -0 lines 0 comments Download
M third_party/WebKit/LayoutTests/virtual/stable/http/tests/serviceworker/webexposed/global-interface-listing-service-worker-expected.txt View 1 2 3 4 5 6 7 8 9 2 chunks +2 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/events/EventTypeNames.in View 1 2 3 4 5 6 7 8 9 10 1 chunk +1 line, -0 lines 0 comments Download
M third_party/WebKit/Source/modules/notifications/Notification.h View 1 2 3 4 5 6 7 8 1 chunk +3 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/modules/notifications/Notification.cpp View 1 2 3 4 5 6 7 8 1 chunk +2 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/modules/notifications/ServiceWorkerGlobalScopeNotifications.h View 1 2 3 4 5 6 7 8 9 1 chunk +1 line, -0 lines 0 comments Download
M third_party/WebKit/Source/modules/notifications/ServiceWorkerGlobalScopeNotifications.idl View 1 2 3 4 5 6 7 8 1 chunk +1 line, -0 lines 0 comments Download
M third_party/WebKit/Source/modules/notifications/ServiceWorkerRegistrationNotifications.cpp View 1 2 3 4 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/modules/serviceworkers/ServiceWorkerGlobalScopeClient.h View 1 2 3 4 5 6 7 8 9 10 1 chunk +1 line, -0 lines 0 comments Download
M third_party/WebKit/Source/modules/serviceworkers/WaitUntilObserver.h View 1 2 3 4 5 6 7 8 9 10 1 chunk +1 line, -0 lines 0 comments Download
M third_party/WebKit/Source/modules/serviceworkers/WaitUntilObserver.cpp View 1 2 3 4 5 6 7 8 9 10 1 chunk +3 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/web/ServiceWorkerGlobalScopeClientImpl.h View 1 2 3 4 5 6 7 8 9 10 1 chunk +1 line, -0 lines 0 comments Download
M third_party/WebKit/Source/web/ServiceWorkerGlobalScopeClientImpl.cpp View 1 2 3 4 5 6 7 8 9 10 1 chunk +5 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/web/ServiceWorkerGlobalScopeProxy.h View 1 2 3 4 5 6 7 8 9 10 1 chunk +1 line, -0 lines 0 comments Download
M third_party/WebKit/Source/web/ServiceWorkerGlobalScopeProxy.cpp View 1 2 3 4 5 6 7 8 9 10 1 chunk +11 lines, -1 line 0 comments Download
M third_party/WebKit/public/web/modules/serviceworker/WebServiceWorkerContextClient.h View 1 2 3 4 5 6 7 8 9 10 1 chunk +5 lines, -0 lines 0 comments Download
M third_party/WebKit/public/web/modules/serviceworker/WebServiceWorkerContextProxy.h View 1 2 3 4 5 6 7 8 9 10 1 chunk +1 line, -0 lines 0 comments Download
M tools/metrics/histograms/histograms.xml View 1 2 3 4 5 6 7 8 9 10 3 chunks +23 lines, -0 lines 0 comments Download

Messages

Total messages: 33 (13 generated)
Nina
Peter, Please give this patch an initial review. It requires polishing, especially NotificationEventDispatcherImpl. I left ...
4 years, 11 months ago (2016-01-21 13:55:37 UTC) #2
Peter Beverloo
Cool, this is exciting! We need to talk process (spec & intent to implement) :-) ...
4 years, 11 months ago (2016-01-21 14:17:37 UTC) #3
Nina
Hi Peter, I believe I've addressed the comments. Please give the updated patch another look ...
4 years, 11 months ago (2016-01-25 14:54:55 UTC) #5
Peter Beverloo
Cool, I like the clean-up! I think we can go a little bit further in ...
4 years, 11 months ago (2016-01-26 16:13:45 UTC) #10
Nina
I like that the notification click dispatch has been moved out of ServiceWorkerVersion [1], a ...
4 years, 11 months ago (2016-01-27 18:48:58 UTC) #12
Peter Beverloo
Yay! Very close :) Thank you https://codereview.chromium.org/1619703002/diff/100001/chrome/browser/notifications/platform_notification_service_browsertest.cc File chrome/browser/notifications/platform_notification_service_browsertest.cc (right): https://codereview.chromium.org/1619703002/diff/100001/chrome/browser/notifications/platform_notification_service_browsertest.cc#newcode337 chrome/browser/notifications/platform_notification_service_browsertest.cc:337: notification.delegate()->Close(true); nit: "true ...
4 years, 11 months ago (2016-01-27 19:03:58 UTC) #13
Nina
Hello Peter, Please review my new patch. Thanks! https://codereview.chromium.org/1619703002/diff/100001/chrome/browser/notifications/platform_notification_service_browsertest.cc File chrome/browser/notifications/platform_notification_service_browsertest.cc (right): https://codereview.chromium.org/1619703002/diff/100001/chrome/browser/notifications/platform_notification_service_browsertest.cc#newcode337 chrome/browser/notifications/platform_notification_service_browsertest.cc:337: notification.delegate()->Close(true); ...
4 years, 10 months ago (2016-01-28 11:59:01 UTC) #14
Peter Beverloo
sgtm! A few more minor nits and then I'll happily stamp :) Please update your ...
4 years, 10 months ago (2016-01-28 16:14:23 UTC) #15
Nina
Hi Peter, I looked at your comments and fixed them. I haven't updated the test ...
4 years, 10 months ago (2016-02-01 17:59:06 UTC) #17
Nina
Okay, looks like I had forgotten to recompile after rebasing. Fixed the expectations.
4 years, 10 months ago (2016-02-01 18:22:02 UTC) #18
Peter Beverloo
lgtm! https://codereview.chromium.org/1619703002/diff/180001/content/browser/notifications/notification_event_dispatcher_impl.cc File content/browser/notifications/notification_event_dispatcher_impl.cc (right): https://codereview.chromium.org/1619703002/diff/180001/content/browser/notifications/notification_event_dispatcher_impl.cc#newcode94 content/browser/notifications/notification_event_dispatcher_impl.cc:94: const scoped_refptr<PlatformNotificationContext> notification_context, const& (elsewhere too) https://codereview.chromium.org/1619703002/diff/180001/content/public/browser/notification_event_dispatcher.h File ...
4 years, 10 months ago (2016-02-03 00:00:23 UTC) #19
Nina
avi@chromium.org: //content/public rbyers@chromium.org: stable web exposed tests. falken@chromium.org: service worker changes. mkwst@chromium.org: IPC. isherman@chromium.org: histograms. ...
4 years, 10 months ago (2016-02-03 12:15:13 UTC) #21
Rick Byers
On 2016/02/03 12:15:13, Nicolás wrote: > mailto:avi@chromium.org: //content/public > > mailto:rbyers@chromium.org: stable web exposed tests. ...
4 years, 10 months ago (2016-02-03 14:33:54 UTC) #22
Avi (use Gerrit)
On 2016/02/03 12:15:13, Nicolás wrote: > mailto:avi@chromium.org: //content/public > > mailto:rbyers@chromium.org: stable web exposed tests. ...
4 years, 10 months ago (2016-02-03 16:20:43 UTC) #23
Ilya Sherman
histograms lgtm
4 years, 10 months ago (2016-02-03 19:43:38 UTC) #24
Mike West
IPC LGTM.
4 years, 10 months ago (2016-02-04 18:04:06 UTC) #25
falken
service worker lgtm
4 years, 10 months ago (2016-02-05 01:53:15 UTC) #26
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1619703002/200001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1619703002/200001
4 years, 10 months ago (2016-02-05 11:13:05 UTC) #29
commit-bot: I haz the power
Committed patchset #11 (id:200001)
4 years, 10 months ago (2016-02-05 12:55:18 UTC) #31
commit-bot: I haz the power
4 years, 10 months ago (2016-02-05 12:56:59 UTC) #33
Message was sent while issue was closed.
Patchset 11 (id:??) landed as
https://crrev.com/2f82b23b3572d1fb653d971ee9b5e0232c4b37e5
Cr-Commit-Position: refs/heads/master@{#373799}

Powered by Google App Engine
This is Rietveld 408576698