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

Issue 920831 link

Starred by 2 users

Issue metadata

Status: Started
Owner:
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Chrome
Pri: 1
Type: Task



Sign in to add a comment

Support FCM based background notifications

Project Member Reported by azeemarshad@chromium.org, Jan 11

Issue description

Android Messages for Web - ChromeOS integration relies on a special long running message dispatch to keep the service worker alive indefinitely and handle background notifications. Given that Messages for Web backend now has support for FCM web push, we should now remove the long running message dispatch and use web push to handle background notifications.

This will involve
1) Adding a method to ServiceWorkerContext to dispatch a regular message event to the service worker.
2) Add a new ConnectionEstablisher implementation that will use method from (1) to notify the service worker to set itself as the active client and subscribe to push messages.
3) Remove the long running message dispatch methods and ConnectionEstablisher.
 
Status: Started (was: Assigned)
Project Member

Comment 2 by bugdroid1@chromium.org, Jan 16 (6 days ago)

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/336e5af427f57ff622051fe84edd6c71fb2889d8

commit 336e5af427f57ff622051fe84edd6c71fb2889d8
Author: Azeem Arshad <azeemarshad@chromium.org>
Date: Wed Jan 16 22:27:25 2019

[ServiceWorker] Add method in ServiceWorkerContext to dispatch message.

This CL adds a public method in ServiceWorkerContext to start an active
service worker and dispatch a message event to it. This is very similar
to StartServiceWorkerAndDispatchLongRunningMessage that was added to
support Android Messages for Web integration in ChromeOS, except that
the service worker will have the default timeout behavior. This will
allow the long running message dispatch to be removed at a later point.

Bug: 920831
Change-Id: I3e9f0d80a8651ac0b51f074ff6b3defc0335d391
Reviewed-on: https://chromium-review.googlesource.com/c/1406021
Reviewed-by: Kinuko Yasuda <kinuko@chromium.org>
Reviewed-by: Matt Falkenhagen <falken@chromium.org>
Commit-Queue: Azeem Arshad <azeemarshad@chromium.org>
Cr-Commit-Position: refs/heads/master@{#623405}
[modify] https://crrev.com/336e5af427f57ff622051fe84edd6c71fb2889d8/chrome/browser/chrome_service_worker_browsertest.cc
[modify] https://crrev.com/336e5af427f57ff622051fe84edd6c71fb2889d8/content/browser/service_worker/service_worker_context_wrapper.cc
[modify] https://crrev.com/336e5af427f57ff622051fe84edd6c71fb2889d8/content/browser/service_worker/service_worker_context_wrapper.h
[modify] https://crrev.com/336e5af427f57ff622051fe84edd6c71fb2889d8/content/public/browser/service_worker_context.h
[modify] https://crrev.com/336e5af427f57ff622051fe84edd6c71fb2889d8/content/public/test/fake_service_worker_context.cc
[modify] https://crrev.com/336e5af427f57ff622051fe84edd6c71fb2889d8/content/public/test/fake_service_worker_context.h

Sign in to add a comment