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

Issue 965573002: Implement support for silent notifications. (Closed)

Created:
5 years, 9 months ago by Peter Beverloo
Modified:
5 years, 9 months ago
CC:
chromium-reviews, darin-cc_chromium.org, peter+watch_chromium.org, jam, mlamouri+watch-notifications_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Implement support for silent notifications. On Android, notifications inherit the user's default settings in regards to audibly notifying them about new notifications through sound (ringtone), vibration and an indicator light, when present. This patch implements support for silent notifications, which allow a Web developer to set the "silent" key when creating a notification, that will suppress these notifiers. We currently don't have any audible notifiers on implementations which use the Message Center, but it's feasible that this will become available in the future. The Web Notification API specifies "sound" and "vibration" fields as well, but we don't support these yet. The Web Notification API specification: https://notifications.spec.whatwg.org/#object-members This is part of a three-sided patch. [1] https://codereview.chromium.org/960163003/ [2] This patch. [3] https://codereview.chromium.org/965463003/ BUG=442134 Committed: https://crrev.com/ad0c0d4798353820b218195b327dba3e422e5918 Cr-Commit-Position: refs/heads/master@{#319455}

Patch Set 1 #

Patch Set 2 : remove useless include #

Total comments: 2

Patch Set 3 : fix typos #

Total comments: 6

Patch Set 4 : michael's comments #

Total comments: 2

Patch Set 5 : address justin's comment #

Patch Set 6 : fix tests #

Unified diffs Side-by-side diffs Delta from patch set Stats (+103 lines, -14 lines) Patch
M chrome/android/java/src/org/chromium/chrome/browser/notifications/NotificationUIManager.java View 1 2 3 4 5 3 chunks +6 lines, -2 lines 0 comments Download
M chrome/android/javatests/src/org/chromium/chrome/browser/notifications/NotificationUIManagerTest.java View 1 2 3 4 5 1 chunk +15 lines, -0 lines 0 comments Download
M chrome/browser/notifications/notification_ui_manager_android.cc View 1 2 3 4 5 3 chunks +13 lines, -3 lines 0 comments Download
M chrome/browser/notifications/platform_notification_service_browsertest.cc View 1 1 chunk +25 lines, -0 lines 0 comments Download
M chrome/browser/notifications/platform_notification_service_impl.cc View 1 chunk +1 line, -0 lines 0 comments Download
M chrome/browser/notifications/platform_notification_service_unittest.cc View 2 chunks +2 lines, -0 lines 0 comments Download
M chrome/test/data/notifications/platform_notification_service.html View 1 2 3 2 chunks +18 lines, -5 lines 0 comments Download
M content/child/notifications/notification_data_conversions.cc View 2 chunks +2 lines, -0 lines 0 comments Download
M content/child/notifications/notification_data_conversions_unittest.cc View 4 chunks +5 lines, -1 line 0 comments Download
M content/common/platform_notification_messages.h View 1 chunk +1 line, -0 lines 0 comments Download
M content/public/common/platform_notification_data.h View 1 2 1 chunk +4 lines, -0 lines 0 comments Download
M content/public/common/platform_notification_data.cc View 1 chunk +2 lines, -1 line 0 comments Download
M ui/message_center/notification.h View 1 2 3 4 2 chunks +5 lines, -0 lines 0 comments Download
M ui/message_center/notification.cc View 1 2 3 4 5 2 chunks +4 lines, -2 lines 0 comments Download

Messages

Total messages: 18 (6 generated)
Peter Beverloo
+mvanouwerkerk and dewittj for review +mkwst for IPC +avi for content/public/
5 years, 9 months ago (2015-02-26 22:36:49 UTC) #2
Avi (use Gerrit)
content/public/ lgtm with fix. https://codereview.chromium.org/965573002/diff/20001/content/public/common/platform_notification_data.h File content/public/common/platform_notification_data.h (right): https://codereview.chromium.org/965573002/diff/20001/content/public/common/platform_notification_data.h#newcode50 content/public/common/platform_notification_data.h:50: // be surpressed. suppressed
5 years, 9 months ago (2015-02-26 22:43:49 UTC) #3
Peter Beverloo
Thanks! https://codereview.chromium.org/965573002/diff/20001/content/public/common/platform_notification_data.h File content/public/common/platform_notification_data.h (right): https://codereview.chromium.org/965573002/diff/20001/content/public/common/platform_notification_data.h#newcode50 content/public/common/platform_notification_data.h:50: // be surpressed. On 2015/02/26 22:43:49, Avi wrote: ...
5 years, 9 months ago (2015-02-26 23:02:42 UTC) #4
Mike West
IPC LGTM.
5 years, 9 months ago (2015-02-27 09:58:58 UTC) #5
Michael van Ouwerkerk
lgtm https://codereview.chromium.org/965573002/diff/40001/chrome/android/javatests/src/org/chromium/chrome/browser/notifications/NotificationUIManagerTest.java File chrome/android/javatests/src/org/chromium/chrome/browser/notifications/NotificationUIManagerTest.java (right): https://codereview.chromium.org/965573002/diff/40001/chrome/android/javatests/src/org/chromium/chrome/browser/notifications/NotificationUIManagerTest.java#newcode163 chrome/android/javatests/src/org/chromium/chrome/browser/notifications/NotificationUIManagerTest.java:163: // Zero indicates that no defaults should be ...
5 years, 9 months ago (2015-02-27 11:31:21 UTC) #6
Peter Beverloo
Thanks Michael! https://codereview.chromium.org/965573002/diff/40001/chrome/android/javatests/src/org/chromium/chrome/browser/notifications/NotificationUIManagerTest.java File chrome/android/javatests/src/org/chromium/chrome/browser/notifications/NotificationUIManagerTest.java (right): https://codereview.chromium.org/965573002/diff/40001/chrome/android/javatests/src/org/chromium/chrome/browser/notifications/NotificationUIManagerTest.java#newcode163 chrome/android/javatests/src/org/chromium/chrome/browser/notifications/NotificationUIManagerTest.java:163: // Zero indicates that no defaults should ...
5 years, 9 months ago (2015-02-27 12:26:30 UTC) #8
dewittj
lgtm + nit https://codereview.chromium.org/965573002/diff/60001/ui/message_center/notification.h File ui/message_center/notification.h (right): https://codereview.chromium.org/965573002/diff/60001/ui/message_center/notification.h#newcode107 ui/message_center/notification.h:107: bool silent() const { return optional_fields_.silent; ...
5 years, 9 months ago (2015-02-27 19:09:32 UTC) #9
Peter Beverloo
Thanks! https://codereview.chromium.org/965573002/diff/60001/ui/message_center/notification.h File ui/message_center/notification.h (right): https://codereview.chromium.org/965573002/diff/60001/ui/message_center/notification.h#newcode107 ui/message_center/notification.h:107: bool silent() const { return optional_fields_.silent; } On ...
5 years, 9 months ago (2015-03-02 19:04:35 UTC) #10
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/965573002/80001
5 years, 9 months ago (2015-03-06 14:49:18 UTC) #13
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/965573002/100001
5 years, 9 months ago (2015-03-06 15:33:16 UTC) #16
commit-bot: I haz the power
Committed patchset #6 (id:100001)
5 years, 9 months ago (2015-03-06 16:27:49 UTC) #17
commit-bot: I haz the power
5 years, 9 months ago (2015-03-06 16:29:13 UTC) #18
Message was sent while issue was closed.
Patchset 6 (id:??) landed as
https://crrev.com/ad0c0d4798353820b218195b327dba3e422e5918
Cr-Commit-Position: refs/heads/master@{#319455}

Powered by Google App Engine
This is Rietveld 408576698