New issue
Advanced search Search tips

Issue 692581 link

Starred by 1 user

Issue metadata

Status: Duplicate
Merged: issue 843081
Owner: ----
Closed: Aug 7
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Bug



Sign in to add a comment

Clicking on a BackgroundFetch notification should trigger an event in the service worker.

Project Member Reported by harkness@chromium.org, Feb 15 2017

Issue description

While a BackgroundFetch is in progress, there will be a visible notification for the user. Through that notification, the user will be able to pause/resume/cancel the fetch. 

Clicking on the notification should navigate to a location defined by the service worker in the fetch, so that the service worker can provide the user with detailed information about the reason for the fetch and the content involved.
 
Cc: mlamouri@chromium.org
Project Member

Comment 2 by bugdroid1@chromium.org, Mar 19 2017

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

commit ef079770a54afefdb2248ad47143a216f8f6ed85
Author: peter <peter@chromium.org>
Date: Sun Mar 19 04:06:40 2017

Service Worker event dispatcher for Background Fetch

This CL implements the BackgroundFetchEventDispatcher and teaches it to
dispatch abort and click events. It then plumbs all the way down to
Blink to do so, after which it feeds back the result to the caller.

The `backgroundfetched` and `backgroundfetchfail` events rely on the
Request and Response objects to be available through Mojo; they will
follow in a subsequent CL.

TBR=avi (new file listed in BUILD.gn)
BUG= 692534 ,  692581 

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

[modify] https://crrev.com/ef079770a54afefdb2248ad47143a216f8f6ed85/content/browser/BUILD.gn
[add] https://crrev.com/ef079770a54afefdb2248ad47143a216f8f6ed85/content/browser/background_fetch/background_fetch_event_dispatcher.cc
[add] https://crrev.com/ef079770a54afefdb2248ad47143a216f8f6ed85/content/browser/background_fetch/background_fetch_event_dispatcher.h
[add] https://crrev.com/ef079770a54afefdb2248ad47143a216f8f6ed85/content/browser/background_fetch/background_fetch_event_dispatcher_unittest.cc
[modify] https://crrev.com/ef079770a54afefdb2248ad47143a216f8f6ed85/content/browser/service_worker/embedded_worker_test_helper.cc
[modify] https://crrev.com/ef079770a54afefdb2248ad47143a216f8f6ed85/content/browser/service_worker/embedded_worker_test_helper.h
[modify] https://crrev.com/ef079770a54afefdb2248ad47143a216f8f6ed85/content/browser/service_worker/service_worker_metrics.cc
[modify] https://crrev.com/ef079770a54afefdb2248ad47143a216f8f6ed85/content/browser/service_worker/service_worker_metrics.h
[modify] https://crrev.com/ef079770a54afefdb2248ad47143a216f8f6ed85/content/common/service_worker/service_worker_event_dispatcher.mojom
[modify] https://crrev.com/ef079770a54afefdb2248ad47143a216f8f6ed85/content/renderer/service_worker/service_worker_context_client.cc
[modify] https://crrev.com/ef079770a54afefdb2248ad47143a216f8f6ed85/content/renderer/service_worker/service_worker_context_client.h
[modify] https://crrev.com/ef079770a54afefdb2248ad47143a216f8f6ed85/content/renderer/service_worker/service_worker_type_converters.cc
[modify] https://crrev.com/ef079770a54afefdb2248ad47143a216f8f6ed85/content/renderer/service_worker/service_worker_type_converters.h
[modify] https://crrev.com/ef079770a54afefdb2248ad47143a216f8f6ed85/content/test/BUILD.gn
[modify] https://crrev.com/ef079770a54afefdb2248ad47143a216f8f6ed85/third_party/WebKit/Source/modules/background_fetch/BackgroundFetchClickEvent.cpp
[modify] https://crrev.com/ef079770a54afefdb2248ad47143a216f8f6ed85/third_party/WebKit/Source/modules/background_fetch/BackgroundFetchClickEvent.h
[modify] https://crrev.com/ef079770a54afefdb2248ad47143a216f8f6ed85/third_party/WebKit/Source/modules/background_fetch/BackgroundFetchEvent.cpp
[modify] https://crrev.com/ef079770a54afefdb2248ad47143a216f8f6ed85/third_party/WebKit/Source/modules/background_fetch/BackgroundFetchEvent.h
[modify] https://crrev.com/ef079770a54afefdb2248ad47143a216f8f6ed85/third_party/WebKit/Source/modules/background_fetch/BackgroundFetchFailEvent.cpp
[modify] https://crrev.com/ef079770a54afefdb2248ad47143a216f8f6ed85/third_party/WebKit/Source/modules/background_fetch/BackgroundFetchedEvent.cpp
[modify] https://crrev.com/ef079770a54afefdb2248ad47143a216f8f6ed85/third_party/WebKit/Source/modules/serviceworkers/ServiceWorkerGlobalScopeClient.h
[modify] https://crrev.com/ef079770a54afefdb2248ad47143a216f8f6ed85/third_party/WebKit/Source/modules/serviceworkers/WaitUntilObserver.cpp
[modify] https://crrev.com/ef079770a54afefdb2248ad47143a216f8f6ed85/third_party/WebKit/Source/modules/serviceworkers/WaitUntilObserver.h
[modify] https://crrev.com/ef079770a54afefdb2248ad47143a216f8f6ed85/third_party/WebKit/Source/web/ServiceWorkerGlobalScopeClientImpl.cpp
[modify] https://crrev.com/ef079770a54afefdb2248ad47143a216f8f6ed85/third_party/WebKit/Source/web/ServiceWorkerGlobalScopeClientImpl.h
[modify] https://crrev.com/ef079770a54afefdb2248ad47143a216f8f6ed85/third_party/WebKit/Source/web/ServiceWorkerGlobalScopeProxy.cpp
[modify] https://crrev.com/ef079770a54afefdb2248ad47143a216f8f6ed85/third_party/WebKit/Source/web/ServiceWorkerGlobalScopeProxy.h
[modify] https://crrev.com/ef079770a54afefdb2248ad47143a216f8f6ed85/third_party/WebKit/public/web/modules/serviceworker/WebServiceWorkerContextClient.h
[modify] https://crrev.com/ef079770a54afefdb2248ad47143a216f8f6ed85/third_party/WebKit/public/web/modules/serviceworker/WebServiceWorkerContextProxy.h
[modify] https://crrev.com/ef079770a54afefdb2248ad47143a216f8f6ed85/tools/metrics/histograms/histograms.xml

Project Member

Comment 3 by bugdroid1@chromium.org, Mar 24 2017

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

commit 4b613c4cd7c83a70d4f176bcb6394b2a800bbd4d
Author: peter <peter@chromium.org>
Date: Fri Mar 24 17:38:21 2017

Implement the BackgroundFetch{Fail,ed} Service Worker events

This CL implements the two final events part of the Background Fetch
API: backgroundfetchfail and backgroundfetched. They'll be dispatched
from the BackgroundFetchEventDispatcher, through the
ServiceWorkerEventDispatcher, to the renderer, where they'll run.

The BackgroundFetchSettledFetch structure has been defined in the
SWEventDispatcher's mojom file, but will move to its more appropriate
location in Blink when the ServiceWorkerFetchRequest/Response types
have been migrated to Mojo proper. This is in-progress.

BUG= 692534 ,  692581 

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

[modify] https://crrev.com/4b613c4cd7c83a70d4f176bcb6394b2a800bbd4d/content/browser/background_fetch/background_fetch_event_dispatcher.cc
[modify] https://crrev.com/4b613c4cd7c83a70d4f176bcb6394b2a800bbd4d/content/browser/background_fetch/background_fetch_event_dispatcher.h
[modify] https://crrev.com/4b613c4cd7c83a70d4f176bcb6394b2a800bbd4d/content/browser/background_fetch/background_fetch_event_dispatcher_unittest.cc
[modify] https://crrev.com/4b613c4cd7c83a70d4f176bcb6394b2a800bbd4d/content/browser/service_worker/embedded_worker_test_helper.cc
[modify] https://crrev.com/4b613c4cd7c83a70d4f176bcb6394b2a800bbd4d/content/browser/service_worker/embedded_worker_test_helper.h
[modify] https://crrev.com/4b613c4cd7c83a70d4f176bcb6394b2a800bbd4d/content/browser/service_worker/service_worker_metrics.cc
[modify] https://crrev.com/4b613c4cd7c83a70d4f176bcb6394b2a800bbd4d/content/browser/service_worker/service_worker_metrics.h
[modify] https://crrev.com/4b613c4cd7c83a70d4f176bcb6394b2a800bbd4d/content/common/background_fetch/background_fetch_struct_traits.cc
[modify] https://crrev.com/4b613c4cd7c83a70d4f176bcb6394b2a800bbd4d/content/common/background_fetch/background_fetch_struct_traits.h
[modify] https://crrev.com/4b613c4cd7c83a70d4f176bcb6394b2a800bbd4d/content/common/background_fetch/background_fetch_types.cc
[modify] https://crrev.com/4b613c4cd7c83a70d4f176bcb6394b2a800bbd4d/content/common/background_fetch/background_fetch_types.h
[modify] https://crrev.com/4b613c4cd7c83a70d4f176bcb6394b2a800bbd4d/content/common/background_fetch/background_fetch_types.typemap
[modify] https://crrev.com/4b613c4cd7c83a70d4f176bcb6394b2a800bbd4d/content/common/service_worker/service_worker_event_dispatcher.mojom
[modify] https://crrev.com/4b613c4cd7c83a70d4f176bcb6394b2a800bbd4d/content/common/service_worker/service_worker_event_dispatcher.typemap
[modify] https://crrev.com/4b613c4cd7c83a70d4f176bcb6394b2a800bbd4d/content/renderer/service_worker/service_worker_context_client.cc
[modify] https://crrev.com/4b613c4cd7c83a70d4f176bcb6394b2a800bbd4d/content/renderer/service_worker/service_worker_context_client.h
[modify] https://crrev.com/4b613c4cd7c83a70d4f176bcb6394b2a800bbd4d/third_party/WebKit/Source/modules/background_fetch/BackgroundFetchFailEvent.cpp
[modify] https://crrev.com/4b613c4cd7c83a70d4f176bcb6394b2a800bbd4d/third_party/WebKit/Source/modules/background_fetch/BackgroundFetchFailEvent.h
[modify] https://crrev.com/4b613c4cd7c83a70d4f176bcb6394b2a800bbd4d/third_party/WebKit/Source/modules/background_fetch/BackgroundFetchedEvent.cpp
[modify] https://crrev.com/4b613c4cd7c83a70d4f176bcb6394b2a800bbd4d/third_party/WebKit/Source/modules/background_fetch/BackgroundFetchedEvent.h
[modify] https://crrev.com/4b613c4cd7c83a70d4f176bcb6394b2a800bbd4d/third_party/WebKit/Source/modules/serviceworkers/ServiceWorkerGlobalScopeClient.h
[modify] https://crrev.com/4b613c4cd7c83a70d4f176bcb6394b2a800bbd4d/third_party/WebKit/Source/modules/serviceworkers/WaitUntilObserver.cpp
[modify] https://crrev.com/4b613c4cd7c83a70d4f176bcb6394b2a800bbd4d/third_party/WebKit/Source/modules/serviceworkers/WaitUntilObserver.h
[modify] https://crrev.com/4b613c4cd7c83a70d4f176bcb6394b2a800bbd4d/third_party/WebKit/Source/web/ServiceWorkerGlobalScopeClientImpl.cpp
[modify] https://crrev.com/4b613c4cd7c83a70d4f176bcb6394b2a800bbd4d/third_party/WebKit/Source/web/ServiceWorkerGlobalScopeClientImpl.h
[modify] https://crrev.com/4b613c4cd7c83a70d4f176bcb6394b2a800bbd4d/third_party/WebKit/Source/web/ServiceWorkerGlobalScopeProxy.cpp
[modify] https://crrev.com/4b613c4cd7c83a70d4f176bcb6394b2a800bbd4d/third_party/WebKit/Source/web/ServiceWorkerGlobalScopeProxy.h
[modify] https://crrev.com/4b613c4cd7c83a70d4f176bcb6394b2a800bbd4d/third_party/WebKit/public/BUILD.gn
[add] https://crrev.com/4b613c4cd7c83a70d4f176bcb6394b2a800bbd4d/third_party/WebKit/public/platform/modules/background_fetch/WebBackgroundFetchSettledFetch.h
[modify] https://crrev.com/4b613c4cd7c83a70d4f176bcb6394b2a800bbd4d/third_party/WebKit/public/web/modules/serviceworker/WebServiceWorkerContextClient.h
[modify] https://crrev.com/4b613c4cd7c83a70d4f176bcb6394b2a800bbd4d/third_party/WebKit/public/web/modules/serviceworker/WebServiceWorkerContextProxy.h
[modify] https://crrev.com/4b613c4cd7c83a70d4f176bcb6394b2a800bbd4d/tools/metrics/histograms/histograms.xml

Comment 4 by peter@chromium.org, Mar 29 2017

Owner: harkness@chromium.org
Status: Started (was: Available)
Owner: ----
Status: Available (was: Started)
Mergedinto: 843081
Status: Duplicate (was: Available)

Sign in to add a comment