Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(392)

Side by Side Diff: third_party/WebKit/Source/modules/background_fetch/BackgroundFetchRegistration.h

Issue 2745543002: Implement BackgroundFetchManager::{get, fetch}() (Closed)
Patch Set: more webexposed tests Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(Empty)
1 // Copyright 2017 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef BackgroundFetchRegistration_h
6 #define BackgroundFetchRegistration_h
7
8 #include "bindings/core/v8/ScriptPromise.h"
9 #include "bindings/core/v8/ScriptWrappable.h"
10 #include "platform/heap/GarbageCollected.h"
11 #include "platform/heap/Handle.h"
12 #include "wtf/text/WTFString.h"
13
14 namespace blink {
15
16 class IconDefinition;
17 class ServiceWorkerRegistration;
18
19 // Represents an individual Background Fetch registration. Gives developers
20 // access to its properties, options, and enables them to abort the fetch.
21 class BackgroundFetchRegistration final
22 : public GarbageCollectedFinalized<BackgroundFetchRegistration>,
23 public ScriptWrappable {
24 DEFINE_WRAPPERTYPEINFO();
25
26 public:
27 BackgroundFetchRegistration(ServiceWorkerRegistration*,
28 String tag,
29 HeapVector<IconDefinition> icons,
30 long long totalDownloadSize,
31 String title);
32 ~BackgroundFetchRegistration();
33
34 String tag() const;
35 HeapVector<IconDefinition> icons() const;
36 long long totalDownloadSize() const;
37 String title() const;
38
39 void abort();
40
41 DECLARE_TRACE();
42
43 private:
44 Member<ServiceWorkerRegistration> m_registration;
45
46 String m_tag;
47 HeapVector<IconDefinition> m_icons;
48 long long m_totalDownloadSize;
49 String m_title;
50 };
51
52 } // namespace blink
53
54 #endif // BackgroundFetchRegistration_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698