| Index: third_party/WebKit/Source/modules/background_fetch/BackgroundFetchRegistration.h
|
| diff --git a/third_party/WebKit/Source/modules/background_fetch/BackgroundFetchRegistration.h b/third_party/WebKit/Source/modules/background_fetch/BackgroundFetchRegistration.h
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..fc9edc321b4fbe9323ab618030051efd9054dfb2
|
| --- /dev/null
|
| +++ b/third_party/WebKit/Source/modules/background_fetch/BackgroundFetchRegistration.h
|
| @@ -0,0 +1,54 @@
|
| +// 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.
|
| +
|
| +#ifndef BackgroundFetchRegistration_h
|
| +#define BackgroundFetchRegistration_h
|
| +
|
| +#include "bindings/core/v8/ScriptPromise.h"
|
| +#include "bindings/core/v8/ScriptWrappable.h"
|
| +#include "platform/heap/GarbageCollected.h"
|
| +#include "platform/heap/Handle.h"
|
| +#include "wtf/text/WTFString.h"
|
| +
|
| +namespace blink {
|
| +
|
| +class IconDefinition;
|
| +class ServiceWorkerRegistration;
|
| +
|
| +// Represents an individual Background Fetch registration. Gives developers
|
| +// access to its properties, options, and enables them to abort the fetch.
|
| +class BackgroundFetchRegistration final
|
| + : public GarbageCollectedFinalized<BackgroundFetchRegistration>,
|
| + public ScriptWrappable {
|
| + DEFINE_WRAPPERTYPEINFO();
|
| +
|
| + public:
|
| + BackgroundFetchRegistration(ServiceWorkerRegistration*,
|
| + String tag,
|
| + HeapVector<IconDefinition> icons,
|
| + long long totalDownloadSize,
|
| + String title);
|
| + ~BackgroundFetchRegistration();
|
| +
|
| + String tag() const;
|
| + HeapVector<IconDefinition> icons() const;
|
| + long long totalDownloadSize() const;
|
| + String title() const;
|
| +
|
| + void abort();
|
| +
|
| + DECLARE_TRACE();
|
| +
|
| + private:
|
| + Member<ServiceWorkerRegistration> m_registration;
|
| +
|
| + String m_tag;
|
| + HeapVector<IconDefinition> m_icons;
|
| + long long m_totalDownloadSize;
|
| + String m_title;
|
| +};
|
| +
|
| +} // namespace blink
|
| +
|
| +#endif // BackgroundFetchRegistration_h
|
|
|