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

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

Issue 2745243002: Implement a Mojo service for Background Fetch (Closed)
Patch Set: Implement a Mojo service for Background Fetch 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
1 // Copyright 2017 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "modules/background_fetch/BackgroundFetchRegistration.h" 5 #include "modules/background_fetch/BackgroundFetchRegistration.h"
6 6
7 #include "modules/background_fetch/BackgroundFetchBridge.h"
7 #include "modules/background_fetch/IconDefinition.h" 8 #include "modules/background_fetch/IconDefinition.h"
8 #include "modules/serviceworkers/ServiceWorkerRegistration.h" 9 #include "modules/serviceworkers/ServiceWorkerRegistration.h"
9 10
10 namespace blink { 11 namespace blink {
11 12
12 BackgroundFetchRegistration::BackgroundFetchRegistration( 13 BackgroundFetchRegistration::BackgroundFetchRegistration(
13 ServiceWorkerRegistration* registration, 14 ServiceWorkerRegistration* registration,
14 String tag, 15 String tag,
15 HeapVector<IconDefinition> icons, 16 HeapVector<IconDefinition> icons,
16 long long totalDownloadSize, 17 long long totalDownloadSize,
(...skipping 16 matching lines...) Expand all
33 34
34 long long BackgroundFetchRegistration::totalDownloadSize() const { 35 long long BackgroundFetchRegistration::totalDownloadSize() const {
35 return m_totalDownloadSize; 36 return m_totalDownloadSize;
36 } 37 }
37 38
38 String BackgroundFetchRegistration::title() const { 39 String BackgroundFetchRegistration::title() const {
39 return m_title; 40 return m_title;
40 } 41 }
41 42
42 void BackgroundFetchRegistration::abort() { 43 void BackgroundFetchRegistration::abort() {
43 // TODO(peter): Implement the ability to abort the active background fetch 44 BackgroundFetchBridge::from(m_registration)->abort(m_tag);
44 // for the |m_registration| identified by the |m_tag|.
45 } 45 }
46 46
47 DEFINE_TRACE(BackgroundFetchRegistration) { 47 DEFINE_TRACE(BackgroundFetchRegistration) {
48 visitor->trace(m_registration); 48 visitor->trace(m_registration);
49 visitor->trace(m_icons); 49 visitor->trace(m_icons);
50 } 50 }
51 51
52 } // namespace blink 52 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698