| Index: third_party/WebKit/Source/modules/background_fetch/BackgroundFetchRegistration.cpp
|
| diff --git a/third_party/WebKit/Source/modules/background_fetch/BackgroundFetchRegistration.cpp b/third_party/WebKit/Source/modules/background_fetch/BackgroundFetchRegistration.cpp
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..0a7aefe160c715595eda47b993d0264856bb98c1
|
| --- /dev/null
|
| +++ b/third_party/WebKit/Source/modules/background_fetch/BackgroundFetchRegistration.cpp
|
| @@ -0,0 +1,52 @@
|
| +// Copyright 2017 The Chromium Authors. All rights reserved.
|
| +// Use of this source code is governed by a BSD-style license that can be
|
| +// found in the LICENSE file.
|
| +
|
| +#include "modules/background_fetch/BackgroundFetchRegistration.h"
|
| +
|
| +#include "modules/background_fetch/IconDefinition.h"
|
| +#include "modules/serviceworkers/ServiceWorkerRegistration.h"
|
| +
|
| +namespace blink {
|
| +
|
| +BackgroundFetchRegistration::BackgroundFetchRegistration(
|
| + ServiceWorkerRegistration* registration,
|
| + String tag,
|
| + HeapVector<IconDefinition> icons,
|
| + long long totalDownloadSize,
|
| + String title)
|
| + : m_registration(registration),
|
| + m_tag(tag),
|
| + m_icons(icons),
|
| + m_totalDownloadSize(totalDownloadSize),
|
| + m_title(title) {}
|
| +
|
| +BackgroundFetchRegistration::~BackgroundFetchRegistration() = default;
|
| +
|
| +String BackgroundFetchRegistration::tag() const {
|
| + return m_tag;
|
| +}
|
| +
|
| +HeapVector<IconDefinition> BackgroundFetchRegistration::icons() const {
|
| + return m_icons;
|
| +}
|
| +
|
| +long long BackgroundFetchRegistration::totalDownloadSize() const {
|
| + return m_totalDownloadSize;
|
| +}
|
| +
|
| +String BackgroundFetchRegistration::title() const {
|
| + return m_title;
|
| +}
|
| +
|
| +void BackgroundFetchRegistration::abort() {
|
| + // TODO(peter): Implement the ability to abort the active background fetch
|
| + // for the |m_registration| identified by the |m_tag|.
|
| +}
|
| +
|
| +DEFINE_TRACE(BackgroundFetchRegistration) {
|
| + visitor->trace(m_registration);
|
| + visitor->trace(m_icons);
|
| +}
|
| +
|
| +} // namespace blink
|
|
|