OLD | NEW |
(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 #include "modules/background_fetch/BackgroundFetchRegistration.h" |
| 6 |
| 7 #include "modules/background_fetch/IconDefinition.h" |
| 8 #include "modules/serviceworkers/ServiceWorkerRegistration.h" |
| 9 |
| 10 namespace blink { |
| 11 |
| 12 BackgroundFetchRegistration::BackgroundFetchRegistration( |
| 13 ServiceWorkerRegistration* registration, |
| 14 String tag, |
| 15 HeapVector<IconDefinition> icons, |
| 16 long long totalDownloadSize, |
| 17 String title) |
| 18 : m_registration(registration), |
| 19 m_tag(tag), |
| 20 m_icons(icons), |
| 21 m_totalDownloadSize(totalDownloadSize), |
| 22 m_title(title) {} |
| 23 |
| 24 BackgroundFetchRegistration::~BackgroundFetchRegistration() = default; |
| 25 |
| 26 String BackgroundFetchRegistration::tag() const { |
| 27 return m_tag; |
| 28 } |
| 29 |
| 30 HeapVector<IconDefinition> BackgroundFetchRegistration::icons() const { |
| 31 return m_icons; |
| 32 } |
| 33 |
| 34 long long BackgroundFetchRegistration::totalDownloadSize() const { |
| 35 return m_totalDownloadSize; |
| 36 } |
| 37 |
| 38 String BackgroundFetchRegistration::title() const { |
| 39 return m_title; |
| 40 } |
| 41 |
| 42 void BackgroundFetchRegistration::abort() { |
| 43 // TODO(peter): Implement the ability to abort the active background fetch |
| 44 // for the |m_registration| identified by the |m_tag|. |
| 45 } |
| 46 |
| 47 DEFINE_TRACE(BackgroundFetchRegistration) { |
| 48 visitor->trace(m_registration); |
| 49 visitor->trace(m_icons); |
| 50 } |
| 51 |
| 52 } // namespace blink |
OLD | NEW |