| OLD | NEW |
| 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/BackgroundFetchedEvent.h" | 5 #include "modules/background_fetch/BackgroundFetchedEvent.h" |
| 6 | 6 |
| 7 #include "bindings/core/v8/ScriptPromiseResolver.h" | 7 #include "bindings/core/v8/ScriptPromiseResolver.h" |
| 8 #include "bindings/core/v8/ScriptState.h" | 8 #include "bindings/core/v8/ScriptState.h" |
| 9 #include "core/dom/DOMException.h" | 9 #include "core/dom/DOMException.h" |
| 10 #include "modules/EventModulesNames.h" | 10 #include "modules/EventModulesNames.h" |
| (...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 49 } | 49 } |
| 50 | 50 |
| 51 void BackgroundFetchedEvent::didUpdateUI( | 51 void BackgroundFetchedEvent::didUpdateUI( |
| 52 ScriptPromiseResolver* resolver, | 52 ScriptPromiseResolver* resolver, |
| 53 mojom::blink::BackgroundFetchError error) { | 53 mojom::blink::BackgroundFetchError error) { |
| 54 switch (error) { | 54 switch (error) { |
| 55 case mojom::blink::BackgroundFetchError::NONE: | 55 case mojom::blink::BackgroundFetchError::NONE: |
| 56 resolver->resolve(); | 56 resolver->resolve(); |
| 57 return; | 57 return; |
| 58 case mojom::blink::BackgroundFetchError::DUPLICATED_TAG: | 58 case mojom::blink::BackgroundFetchError::DUPLICATED_TAG: |
| 59 case mojom::blink::BackgroundFetchError::INVALID_TAG: |
| 59 // Not applicable for this callback. | 60 // Not applicable for this callback. |
| 60 break; | 61 break; |
| 61 } | 62 } |
| 62 | 63 |
| 63 NOTREACHED(); | 64 NOTREACHED(); |
| 64 } | 65 } |
| 65 | 66 |
| 66 const AtomicString& BackgroundFetchedEvent::interfaceName() const { | 67 const AtomicString& BackgroundFetchedEvent::interfaceName() const { |
| 67 return EventNames::BackgroundFetchedEvent; | 68 return EventNames::BackgroundFetchedEvent; |
| 68 } | 69 } |
| 69 | 70 |
| 70 DEFINE_TRACE(BackgroundFetchedEvent) { | 71 DEFINE_TRACE(BackgroundFetchedEvent) { |
| 71 visitor->trace(m_fetches); | 72 visitor->trace(m_fetches); |
| 72 visitor->trace(m_registration); | 73 visitor->trace(m_registration); |
| 73 BackgroundFetchEvent::trace(visitor); | 74 BackgroundFetchEvent::trace(visitor); |
| 74 } | 75 } |
| 75 | 76 |
| 76 } // namespace blink | 77 } // namespace blink |
| OLD | NEW |