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

Issue 1750083004: Add badge to web notifications. (Closed)

Created:
4 years, 9 months ago by Michael van Ouwerkerk
Modified:
4 years, 9 months ago
CC:
blink-reviews, blink-reviews-api_chromium.org, chromium-reviews, darin-cc_chromium.org, dglazkov+blink, jam, kinuko+watch, mlamouri+watch-notifications_chromium.org, Peter Beverloo
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Add badge to web notifications. * This is guarded by the NotificationBadge runtime flag. * On Android M+ the badge is displayed in the status bar, otherwise Chrome falls back to the default Chrome icon. * On all Android versions the badge is displayed in the notification. * Not quite correct on desktop yet (it conflicts with the settings button). * Screenshots: https://imgur.com/a/wewTP * Spec discussion: https://github.com/whatwg/notifications/issues/65 * Spec PR: https://github.com/mvano/notifications/commit/d79fe317ccc00dc7e27dde88928dc33bcf38e5b4 * Intent to implement and ship: https://goo.gl/4KwzyR BUG=591394 Committed: https://crrev.com/2dc0200c983a414b1ec462b5fe6fee0076e67231 Cr-Commit-Position: refs/heads/master@{#381927}

Patch Set 1 #

Total comments: 14

Patch Set 2 : Address peter's comments. #

Patch Set 3 : Fix tests. #

Patch Set 4 : Rebase. Rename smallIcon to badge. #

Patch Set 5 : Fix test. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+215 lines, -58 lines) Patch
M chrome/android/java/res/layout/web_notification_small_icon.xml View 1 chunk +0 lines, -1 line 0 comments Download
M chrome/android/java/src/org/chromium/chrome/browser/notifications/CustomNotificationBuilder.java View 4 chunks +11 lines, -12 lines 0 comments Download
M chrome/android/java/src/org/chromium/chrome/browser/notifications/NotificationBuilderBase.java View 4 chunks +31 lines, -1 line 0 comments Download
M chrome/android/java/src/org/chromium/chrome/browser/notifications/NotificationUIManager.java View 1 2 3 3 chunks +4 lines, -1 line 0 comments Download
M chrome/android/java/src/org/chromium/chrome/browser/notifications/StandardNotificationBuilder.java View 1 chunk +1 line, -1 line 0 comments Download
M chrome/android/javatests/src/org/chromium/chrome/browser/notifications/CustomNotificationBuilderTest.java View 1 4 chunks +22 lines, -1 line 0 comments Download
M chrome/browser/notifications/notification_ui_manager_android.cc View 1 2 3 2 chunks +6 lines, -1 line 0 comments Download
M chrome/browser/notifications/platform_notification_service_browsertest.cc View 1 2 3 4 chunks +9 lines, -0 lines 0 comments Download
M chrome/browser/notifications/platform_notification_service_impl.cc View 1 2 3 1 chunk +5 lines, -0 lines 0 comments Download
M chrome/test/data/notifications/platform_notification_service.html View 1 2 3 1 chunk +1 line, -0 lines 0 comments Download
M content/browser/notifications/notification_database_data.proto View 1 2 3 2 chunks +2 lines, -1 line 0 comments Download
M content/browser/notifications/notification_database_data_conversions.cc View 1 2 3 2 chunks +2 lines, -0 lines 0 comments Download
M content/browser/notifications/notification_database_data_unittest.cc View 1 2 3 3 chunks +3 lines, -0 lines 0 comments Download
M content/browser/notifications/notification_message_filter.cc View 1 2 3 1 chunk +4 lines, -0 lines 0 comments Download
M content/child/notifications/notification_data_conversions.cc View 1 2 3 2 chunks +2 lines, -0 lines 0 comments Download
M content/child/notifications/notification_data_conversions_unittest.cc View 1 2 3 5 chunks +5 lines, -0 lines 0 comments Download
M content/child/notifications/notification_manager.cc View 1 2 3 1 chunk +2 lines, -0 lines 0 comments Download
M content/child/notifications/pending_notification.h View 1 2 3 1 chunk +7 lines, -2 lines 0 comments Download
M content/child/notifications/pending_notification.cc View 1 2 3 3 chunks +14 lines, -5 lines 0 comments Download
M content/child/notifications/pending_notifications_tracker_unittest.cc View 1 2 3 4 chunks +28 lines, -14 lines 0 comments Download
M content/common/notification_constants.h View 1 2 3 1 chunk +4 lines, -0 lines 0 comments Download
M content/common/platform_notification_messages.h View 1 2 3 2 chunks +2 lines, -0 lines 0 comments Download
M content/public/common/notification_resources.h View 1 2 3 1 chunk +4 lines, -0 lines 0 comments Download
M content/public/common/platform_notification_data.h View 1 2 3 1 chunk +4 lines, -0 lines 0 comments Download
A content/test/data/notifications/48x48.png View Binary file 0 comments Download
M third_party/WebKit/LayoutTests/http/tests/notifications/notification-properties.html View 1 2 3 4 chunks +7 lines, -2 lines 0 comments Download
M third_party/WebKit/LayoutTests/http/tests/notifications/serviceworker-notification-properties.html View 1 2 3 4 1 chunk +1 line, -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 1 chunk +1 line, -0 lines 0 comments Download
M third_party/WebKit/LayoutTests/webexposed/global-interface-listing-dedicated-worker-expected.txt View 1 2 3 1 chunk +1 line, -0 lines 0 comments Download
M third_party/WebKit/LayoutTests/webexposed/global-interface-listing-expected.txt View 1 2 3 1 chunk +1 line, -0 lines 0 comments Download
M third_party/WebKit/LayoutTests/webexposed/global-interface-listing-shared-worker-expected.txt View 1 2 3 1 chunk +1 line, -0 lines 0 comments Download
M third_party/WebKit/Source/modules/notifications/Notification.h View 1 2 3 1 chunk +1 line, -0 lines 0 comments Download
M third_party/WebKit/Source/modules/notifications/Notification.cpp View 1 2 3 1 chunk +5 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/modules/notifications/Notification.idl View 1 2 3 1 chunk +1 line, -0 lines 0 comments Download
M third_party/WebKit/Source/modules/notifications/NotificationData.cpp View 1 2 3 4 chunks +15 lines, -15 lines 0 comments Download
M third_party/WebKit/Source/modules/notifications/NotificationDataTest.cpp View 1 2 3 5 chunks +5 lines, -1 line 0 comments Download
M third_party/WebKit/Source/modules/notifications/NotificationOptions.idl View 1 2 3 1 chunk +1 line, -0 lines 0 comments Download
M third_party/WebKit/Source/platform/RuntimeEnabledFeatures.in View 1 2 3 1 chunk +1 line, -0 lines 0 comments Download
M third_party/WebKit/public/platform/modules/notifications/WebNotificationData.h View 1 2 3 1 chunk +1 line, -0 lines 0 comments Download

Messages

Total messages: 45 (23 generated)
Michael van Ouwerkerk
Peter, could you take a look please?
4 years, 9 months ago (2016-03-02 16:13:48 UTC) #3
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1750083004/1 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1750083004/1
4 years, 9 months ago (2016-03-02 16:14:57 UTC) #5
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: linux_chromium_rel_ng on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_rel_ng/builds/190326)
4 years, 9 months ago (2016-03-02 17:26:20 UTC) #8
Peter Beverloo
Code lgtm % comments, but– - Please be sure to send out an Intent to ...
4 years, 9 months ago (2016-03-03 17:55:39 UTC) #9
Michael van Ouwerkerk
Thanks Peter. https://codereview.chromium.org/1750083004/diff/1/chrome/android/java/src/org/chromium/chrome/browser/notifications/NotificationUIManager.java File chrome/android/java/src/org/chromium/chrome/browser/notifications/NotificationUIManager.java (right): https://codereview.chromium.org/1750083004/diff/1/chrome/android/java/src/org/chromium/chrome/browser/notifications/NotificationUIManager.java#newcode440 chrome/android/java/src/org/chromium/chrome/browser/notifications/NotificationUIManager.java:440: * to display the whole notification. It ...
4 years, 9 months ago (2016-03-09 18:28:25 UTC) #11
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1750083004/20001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1750083004/20001
4 years, 9 months ago (2016-03-09 18:28:52 UTC) #13
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: win_chromium_rel_ng on tryserver.chromium.win (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.win/builders/win_chromium_rel_ng/builds/186484)
4 years, 9 months ago (2016-03-09 19:59:41 UTC) #15
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1750083004/40001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1750083004/40001
4 years, 9 months ago (2016-03-10 11:12:29 UTC) #17
Michael van Ouwerkerk
Jochen, could you take a look please as owner of: RuntimeEnabledFeatures.in content/
4 years, 9 months ago (2016-03-10 11:14:54 UTC) #19
Michael van Ouwerkerk
Newton, could you take a look please as owner of: web_notification_small_icon.xml
4 years, 9 months ago (2016-03-10 11:15:26 UTC) #21
Michael van Ouwerkerk
Mike, could you take a look please as owner of platform_notification_messages.h?
4 years, 9 months ago (2016-03-10 11:17:03 UTC) #23
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: win_chromium_rel_ng on tryserver.chromium.win (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.win/builders/win_chromium_rel_ng/builds/187122)
4 years, 9 months ago (2016-03-10 13:28:48 UTC) #25
jochen (gone - plz use gerrit)
lgtm
4 years, 9 months ago (2016-03-10 15:50:50 UTC) #26
Mike West
Adding the icon to IPC LGTM.
4 years, 9 months ago (2016-03-11 07:20:54 UTC) #27
newt (away)
web_notification_small_icon.xml lgtm. Sorry for the delay -- I was away.
4 years, 9 months ago (2016-03-14 23:12:34 UTC) #28
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1750083004/60001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1750083004/60001
4 years, 9 months ago (2016-03-17 12:32:19 UTC) #31
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: mac_chromium_rel_ng on tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/mac_chromium_rel_ng/builds/196634)
4 years, 9 months ago (2016-03-17 14:15:45 UTC) #33
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1750083004/80001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1750083004/80001
4 years, 9 months ago (2016-03-17 17:59:59 UTC) #35
commit-bot: I haz the power
Dry run: This issue passed the CQ dry run.
4 years, 9 months ago (2016-03-17 19:25:04 UTC) #37
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1750083004/80001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1750083004/80001
4 years, 9 months ago (2016-03-18 10:15:42 UTC) #41
commit-bot: I haz the power
Committed patchset #5 (id:80001)
4 years, 9 months ago (2016-03-18 10:21:55 UTC) #43
commit-bot: I haz the power
4 years, 9 months ago (2016-03-18 10:22:54 UTC) #45
Message was sent while issue was closed.
Patchset 5 (id:??) landed as
https://crrev.com/2dc0200c983a414b1ec462b5fe6fee0076e67231
Cr-Commit-Position: refs/heads/master@{#381927}

Powered by Google App Engine
This is Rietveld 408576698