New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.
Starred by 17 users

Issue metadata

Status: WontFix
Owner:
Last visit > 30 days ago
Closed: May 2018
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: All
Pri: 3
Type: Feature

Blocked on:
issue 516147
issue 326539



Sign in to add a comment
link

Issue 397197: Build an API to allow a custom notification provider for Chrome

Reported by petewil@chromium.org, Jul 24 2014 Project Member

Issue description

Today Chrome has a built in notification center that is used for web and app notifications.  However, there are two things it doesn't provide:
1. It only works with some Linux builds.  Others are not supported.
2. Some Mac users feel that all notifications should go to the Mac notification center instead of having two separate notification centers.

If we provide and API which lets a chrome app or extension get to notifications, this will unblock third parties from creating an app which can show notifications on Linux, or forward notifications to the Mac notification center.

So, Let's build and implement a NotificationProvider API to allow a custom notification provider to handle notifications for these two cases.
 

Comment 1 by kalman@chromium.org, Jul 24 2014

> forward notifications to the Mac notification center

how will an app implement this? native messaging or something?

Comment 2 by bugdroid1@chromium.org, Aug 2 2014

Project Member
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/0a0e32150f1f3bfce3d0ecd082da4a6f11b0101f

commit 0a0e32150f1f3bfce3d0ecd082da4a6f11b0101f
Author: liyanhou@chromium.org <liyanhou@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>
Date: Sat Aug 02 05:45:34 2014

Notification Provider API

The Notification provider API will reroute the notifications that are supposed to be sent to the Chrome Notification Center, so an app can get the notifications and have its own implementation of notification center.

BUG= 397197 

Review URL: https://codereview.chromium.org/356673003

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@287155 0039d316-1c4b-4281-b951-d872f2087c98

Comment 3 by bugdroid1@chromium.org, Aug 2 2014

Project Member
------------------------------------------------------------------
r287155 | liyanhou@chromium.org | 2014-08-02T05:45:34.518101Z

Changed paths:
   M http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/permissions/chrome_api_permissions.cc?r1=287155&r2=287154&pathrev=287155
   M http://src.chromium.org/viewvc/chrome/trunk/src/tools/metrics/histograms/histograms.xml?r1=287155&r2=287154&pathrev=287155
   M http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/permissions/permission_set_unittest.cc?r1=287155&r2=287154&pathrev=287155
   A http://src.chromium.org/viewvc/chrome/trunk/src/chrome/browser/extensions/api/notification_provider?r1=287155&r2=287154&pathrev=287155
   M http://src.chromium.org/viewvc/chrome/trunk/src/extensions/common/permissions/api_permission.h?r1=287155&r2=287154&pathrev=287155
   M http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/api/_permission_features.json?r1=287155&r2=287154&pathrev=287155
   A http://src.chromium.org/viewvc/chrome/trunk/src/chrome/test/data/extensions/api_test/notification_provider/events/test.js?r1=287155&r2=287154&pathrev=287155
   A http://src.chromium.org/viewvc/chrome/trunk/src/chrome/test/data/extensions/api_test/notification_provider?r1=287155&r2=287154&pathrev=287155
   A http://src.chromium.org/viewvc/chrome/trunk/src/chrome/test/data/extensions/api_test/notification_provider/events?r1=287155&r2=287154&pathrev=287155
   M http://src.chromium.org/viewvc/chrome/trunk/src/chrome/chrome_browser_extensions.gypi?r1=287155&r2=287154&pathrev=287155
   M http://src.chromium.org/viewvc/chrome/trunk/src/chrome/chrome_tests.gypi?r1=287155&r2=287154&pathrev=287155
   M http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/api/api.gyp?r1=287155&r2=287154&pathrev=287155
   A http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/api/notification_provider.idl?r1=287155&r2=287154&pathrev=287155
   A http://src.chromium.org/viewvc/chrome/trunk/src/chrome/browser/extensions/api/notification_provider/notification_provider_api.cc?r1=287155&r2=287154&pathrev=287155
   A http://src.chromium.org/viewvc/chrome/trunk/src/chrome/browser/extensions/api/notification_provider/notification_provider_apitest.cc?r1=287155&r2=287154&pathrev=287155
   A http://src.chromium.org/viewvc/chrome/trunk/src/chrome/browser/extensions/api/notification_provider/notification_provider_api.h?r1=287155&r2=287154&pathrev=287155
   M http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/api/_api_features.json?r1=287155&r2=287154&pathrev=287155
   A http://src.chromium.org/viewvc/chrome/trunk/src/chrome/test/data/extensions/api_test/notification_provider/events/manifest.json?r1=287155&r2=287154&pathrev=287155
   M http://src.chromium.org/viewvc/chrome/trunk/src/extensions/browser/extension_function_histogram_value.h?r1=287155&r2=287154&pathrev=287155

Notification Provider API

The Notification provider API will reroute the notifications that are supposed to be sent to the Chrome Notification Center, so an app can get the notifications and have its own implementation of notification center.

BUG= 397197 

Review URL: https://codereview.chromium.org/356673003
-----------------------------------------------------------------

Comment 4 by bugdroid1@chromium.org, Aug 2 2014

Project Member
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/06b61941863e39e5c20d213ac131f157d0760c20

commit 06b61941863e39e5c20d213ac131f157d0760c20
Author: pneubeck@chromium.org <pneubeck@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>
Date: Sat Aug 02 07:30:30 2014

Fix memory leak in NotificationProviderApiTest.Events.

This new test had a memory leak as reported by Linux ASan LSan:

http://build.chromium.org/p/chromium.memory/builders/Linux%20ASan%20LSan%20Tests%20%281%29/builds/4540/steps/browser_tests/logs/Events

TBR=kalman@chromium.org, liyanhou@chromium.org
BUG= 397197 
NOTREECHECKS=true
NOTRY=true

Review URL: https://codereview.chromium.org/433073003

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@287170 0039d316-1c4b-4281-b951-d872f2087c98

Comment 5 by bugdroid1@chromium.org, Aug 2 2014

Project Member
------------------------------------------------------------------
r287170 | pneubeck@chromium.org | 2014-08-02T07:30:30.014616Z

Changed paths:
   M http://src.chromium.org/viewvc/chrome/trunk/src/chrome/browser/extensions/api/notification_provider/notification_provider_apitest.cc?r1=287170&r2=287169&pathrev=287170

Fix memory leak in NotificationProviderApiTest.Events.

This new test had a memory leak as reported by Linux ASan LSan:

http://build.chromium.org/p/chromium.memory/builders/Linux%20ASan%20LSan%20Tests%20%281%29/builds/4540/steps/browser_tests/logs/Events

TBR=kalman@chromium.org, liyanhou@chromium.org
BUG= 397197 
NOTREECHECKS=true
NOTRY=true

Review URL: https://codereview.chromium.org/433073003
-----------------------------------------------------------------

Comment 6 by bugdroid1@chromium.org, Aug 15 2014

Project Member

Comment 7 by bugdroid1@chromium.org, Aug 15 2014

Project Member
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/d9df9c9a84eb7998443ada2cf97fc12d819d0021

commit d9df9c9a84eb7998443ada2cf97fc12d819d0021
Author: liyanhou@chromium.org <liyanhou@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>
Date: Fri Aug 15 03:06:44 2014

add a test app using notification provider API

Add a test app using notification provider API. When a notification is
created, updated or cleared, the app will display the newly created
notification, updates, and closes it.

BUG= 397197 

Review URL: https://codereview.chromium.org/461403005

Cr-Commit-Position: refs/heads/master@{#289756}
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@289756 0039d316-1c4b-4281-b951-d872f2087c98

Comment 8 by bugdroid1@chromium.org, Aug 15 2014

Project Member
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/728d945c4ba9ecaba9268927a3b3d000b3ff3273

commit 728d945c4ba9ecaba9268927a3b3d000b3ff3273
Author: liyanhou@chromium.org <liyanhou@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>
Date: Fri Aug 15 09:12:13 2014

Add NotifyOnShowSettings implementation of notification
provider API and test.

When an extension/app with notificationProvider permission
shows a user that certain notifiers have advanced settings.
When the user clicks and chooses to see advanced settings of
one notifier, NotifyOnShowSettings can be used to inform the
notifier that a user requested advanced settings, so the
notifier can do something else to display its advanced
settings.

BUG= 397197 

Review URL: https://codereview.chromium.org/456223002

Cr-Commit-Position: refs/heads/master@{#289823}
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@289823 0039d316-1c4b-4281-b951-d872f2087c98

Comment 9 by bugdroid1@chromium.org, Aug 15 2014

Project Member
------------------------------------------------------------------
r289823 | liyanhou@chromium.org | 2014-08-15T09:12:13.099680Z

Changed paths:
   M http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/api/notification_provider.idl?r1=289823&r2=289822&pathrev=289823
   M http://src.chromium.org/viewvc/chrome/trunk/src/chrome/browser/extensions/api/notification_provider/notification_provider_api.cc?r1=289823&r2=289822&pathrev=289823
   M http://src.chromium.org/viewvc/chrome/trunk/src/chrome/test/data/extensions/api_test/notification_provider/basic_usage/background.js?r1=289823&r2=289822&pathrev=289823

Add NotifyOnShowSettings implementation of notification
provider API and test.

When an extension/app with notificationProvider permission
shows a user that certain notifiers have advanced settings.
When the user clicks and chooses to see advanced settings of
one notifier, NotifyOnShowSettings can be used to inform the
notifier that a user requested advanced settings, so the
notifier can do something else to display its advanced
settings.

BUG= 397197 

Review URL: https://codereview.chromium.org/456223002
-----------------------------------------------------------------

Comment 10 by bugdroid1@chromium.org, Aug 16 2014

Project Member
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/e8ef8769f62b13fab35bd41323cafc70fb74f230

commit e8ef8769f62b13fab35bd41323cafc70fb74f230
Author: liyanhou@chromium.org <liyanhou@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>
Date: Sat Aug 16 06:10:14 2014

Add NotifyOnPermissionLevelChanged implementation of notification
provider API

When an extension/app with notificationProvider permission shows a user
information about sources of the notifications, the notifiers. When the
user wants to allow or disallow one notifier, NotifyOnPermissionLevelChanged
can be used to inform the notifier that its permission level was changed.

BUG= 397197 

Review URL: https://codereview.chromium.org/468813002

Cr-Commit-Position: refs/heads/master@{#290105}
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@290105 0039d316-1c4b-4281-b951-d872f2087c98

Comment 11 by bugdroid1@chromium.org, Aug 16 2014

Project Member
------------------------------------------------------------------
r290105 | liyanhou@chromium.org | 2014-08-16T06:10:14.153917Z

Changed paths:
   M http://src.chromium.org/viewvc/chrome/trunk/src/chrome/browser/extensions/api/notification_provider/notification_provider_api.cc?r1=290105&r2=290104&pathrev=290105
   M http://src.chromium.org/viewvc/chrome/trunk/src/chrome/test/data/extensions/api_test/notification_provider/basic_usage/background.js?r1=290105&r2=290104&pathrev=290105

Add NotifyOnPermissionLevelChanged implementation of notification
provider API

When an extension/app with notificationProvider permission shows a user
information about sources of the notifications, the notifiers. When the
user wants to allow or disallow one notifier, NotifyOnPermissionLevelChanged
can be used to inform the notifier that its permission level was changed.

BUG= 397197 

Review URL: https://codereview.chromium.org/468813002
-----------------------------------------------------------------

Comment 12 by rsesek@chromium.org, Aug 18 2014

Cc: rsesek@chromium.org
>> forward notifications to the Mac notification center
>
> how will an app implement this? native messaging or something?

Nobody answered kalman@'s question. How is this supposed to work? Extensions are sandboxed and won't have access to the system notification center.

Comment 13 by dimich@google.com, Aug 18 2014

Re: #12, the native messaging could be used for that. This implies that a solution would rely on installing a native messaging host, as described here: https://developer.chrome.com/extensions/messaging#native-messaging

I believe this was answered in a mail thread but somehow was not reflected here...

Comment 14 by santhoshba@chromium.org, Dec 16 2014

Owner: ----
Status: Available

Comment 15 by dewittj@chromium.org, Apr 20 2015

 Issue 478103  has been merged into this issue.

Comment 16 by sheriffbot@chromium.org, Apr 20 2016

Project Member
Labels: Hotlist-Recharge-Cold
Status: Untriaged (was: Available)
This issue has been available for more than 365 days, and should be re-evaluated. Hotlist-Recharge-Cold label is added for tracking. Please re-triage this issue.

For more details visit https://sites.google.com/a/chromium.org/dev/issue-tracking/autotriage - Your friendly Sheriffbot

Comment 17 by rsesek@chromium.org, Apr 20 2016

Owner: miguelg@chromium.org
-> miguelg for triage

Comment 18 by miguelg@chromium.org, Apr 20 2016

Cc: peter@chromium.org owe...@chromium.org
We are working on migrating to the native notification centers in those platforms where we believe the support is good enough. By definition the remaining platforms will not provide enough capabilities.

The suggested API would provide more a bit more flexibility, at the expense of complicating the code base even more. I don't think it's worth it but adding a few more folks to make sure we are on agreement.

Comment 19 by miguelg@chromium.org, Apr 20 2016

Labels: -Pri-2 Pri-3

Comment 20 by dewittj@chromium.org, Apr 20 2016

With the introduction of native NCs, I think this feature could be abandoned, since the primary use case would no longer exist.

Comment 21 by joh...@chromium.org, May 23 2016

Blockedon: 516147 326539
Marking this as blocked on  issue 326539  and issue 516147 which track switching to native notification centers on Mac and Windows. If those make good progress, it'll probably make sense to remove the experimental API.

Comment 22 by joh...@chromium.org, May 23 2016

Status: Available (was: Untriaged)

Comment 23 by bugdroid1@chromium.org, Feb 14 2017

Project Member
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/f9fbe22a90c39cb811e94976923ebff0bc7f939f

commit f9fbe22a90c39cb811e94976923ebff0bc7f939f
Author: peter <peter@chromium.org>
Date: Tue Feb 14 13:22:44 2017

Remove the notificationProvider extension API

The NotificationProvider API was meant to provide a way for Chrome Apps
and extensions to take over handling of notifications from the Message
Center, for example to defer to the native notification center on a
system. However, the API was neither completed, nor shipped.

Today we're working on implementing support for native notification
centers directly to Chrome, not requiring any additional extension
support. This is already supported on Mac and is in development for
Windows. This makes an important use-case of the API redundant.

Let's remove the API. We can always revisit in the future.

BUG= 397197 , 482733

Review-Url: https://codereview.chromium.org/2659533003
Cr-Commit-Position: refs/heads/master@{#450333}

[modify] https://crrev.com/f9fbe22a90c39cb811e94976923ebff0bc7f939f/chrome/browser/BUILD.gn
[modify] https://crrev.com/f9fbe22a90c39cb811e94976923ebff0bc7f939f/chrome/browser/extensions/BUILD.gn
[delete] https://crrev.com/6fd678c91c89cfe647fbbbecf98bf19d8979052c/chrome/browser/extensions/api/notification_provider/OWNERS
[delete] https://crrev.com/6fd678c91c89cfe647fbbbecf98bf19d8979052c/chrome/browser/extensions/api/notification_provider/notification_provider_api.cc
[delete] https://crrev.com/6fd678c91c89cfe647fbbbecf98bf19d8979052c/chrome/browser/extensions/api/notification_provider/notification_provider_api.h
[delete] https://crrev.com/6fd678c91c89cfe647fbbbecf98bf19d8979052c/chrome/browser/extensions/api/notification_provider/notification_provider_apitest.cc
[modify] https://crrev.com/f9fbe22a90c39cb811e94976923ebff0bc7f939f/chrome/browser/extensions/api/notifications/notifications_api.cc
[modify] https://crrev.com/f9fbe22a90c39cb811e94976923ebff0bc7f939f/chrome/browser/notifications/message_center_notification_manager.cc
[modify] https://crrev.com/f9fbe22a90c39cb811e94976923ebff0bc7f939f/chrome/browser/notifications/message_center_notification_manager.h
[delete] https://crrev.com/6fd678c91c89cfe647fbbbecf98bf19d8979052c/chrome/browser/notifications/notification_conversion_helper.cc
[delete] https://crrev.com/6fd678c91c89cfe647fbbbecf98bf19d8979052c/chrome/browser/notifications/notification_conversion_helper.h
[delete] https://crrev.com/6fd678c91c89cfe647fbbbecf98bf19d8979052c/chrome/browser/notifications/notification_conversion_helper_unittest.cc
[modify] https://crrev.com/f9fbe22a90c39cb811e94976923ebff0bc7f939f/chrome/common/extensions/api/BUILD.gn
[modify] https://crrev.com/f9fbe22a90c39cb811e94976923ebff0bc7f939f/chrome/common/extensions/api/_api_features.json
[modify] https://crrev.com/f9fbe22a90c39cb811e94976923ebff0bc7f939f/chrome/common/extensions/api/_permission_features.json
[delete] https://crrev.com/6fd678c91c89cfe647fbbbecf98bf19d8979052c/chrome/common/extensions/api/notification_provider.idl
[modify] https://crrev.com/f9fbe22a90c39cb811e94976923ebff0bc7f939f/chrome/common/extensions/permissions/chrome_api_permissions.cc
[modify] https://crrev.com/f9fbe22a90c39cb811e94976923ebff0bc7f939f/chrome/common/extensions/permissions/permission_set_unittest.cc
[modify] https://crrev.com/f9fbe22a90c39cb811e94976923ebff0bc7f939f/chrome/test/BUILD.gn
[delete] https://crrev.com/6fd678c91c89cfe647fbbbecf98bf19d8979052c/chrome/test/data/extensions/api_test/notification_provider/basic_usage/background.js
[delete] https://crrev.com/6fd678c91c89cfe647fbbbecf98bf19d8979052c/chrome/test/data/extensions/api_test/notification_provider/basic_usage/icon.png
[delete] https://crrev.com/6fd678c91c89cfe647fbbbecf98bf19d8979052c/chrome/test/data/extensions/api_test/notification_provider/basic_usage/manifest.json
[delete] https://crrev.com/6fd678c91c89cfe647fbbbecf98bf19d8979052c/chrome/test/data/extensions/api_test/notification_provider/events/icon.png
[delete] https://crrev.com/6fd678c91c89cfe647fbbbecf98bf19d8979052c/chrome/test/data/extensions/api_test/notification_provider/events/manifest.json
[delete] https://crrev.com/6fd678c91c89cfe647fbbbecf98bf19d8979052c/chrome/test/data/extensions/api_test/notification_provider/events/test.js
[delete] https://crrev.com/6fd678c91c89cfe647fbbbecf98bf19d8979052c/chrome/test/data/extensions/api_test/notification_provider/test_app/app.js
[delete] https://crrev.com/6fd678c91c89cfe647fbbbecf98bf19d8979052c/chrome/test/data/extensions/api_test/notification_provider/test_app/main.js
[delete] https://crrev.com/6fd678c91c89cfe647fbbbecf98bf19d8979052c/chrome/test/data/extensions/api_test/notification_provider/test_app/manifest.json
[delete] https://crrev.com/6fd678c91c89cfe647fbbbecf98bf19d8979052c/chrome/test/data/extensions/api_test/notification_provider/test_app/styles.css
[delete] https://crrev.com/6fd678c91c89cfe647fbbbecf98bf19d8979052c/chrome/test/data/extensions/api_test/notification_provider/test_app/window.html
[modify] https://crrev.com/f9fbe22a90c39cb811e94976923ebff0bc7f939f/extensions/browser/extension_event_histogram_value.h
[modify] https://crrev.com/f9fbe22a90c39cb811e94976923ebff0bc7f939f/extensions/common/permissions/api_permission.h
[modify] https://crrev.com/f9fbe22a90c39cb811e94976923ebff0bc7f939f/tools/metrics/histograms/histograms.xml

Comment 24 by sheriffbot@chromium.org, May 2 2018

Project Member
Status: Untriaged (was: Available)
This issue has been Available for over a year. If it's no longer important or seems unlikely to be fixed, please consider closing it out. If it is important, please re-triage the issue.

Sorry for the inconvenience if the bug really should have been left as Available.

For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot

Comment 25 by peter@chromium.org, May 2 2018

Status: WontFix (was: Untriaged)

Sign in to add a comment