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

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

Issue 2774343002: Hook up BackgroundFetchServiceImpl::Fetch() to start a fetch (Closed)
Patch Set: Created 3 years, 8 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/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 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
70 } 70 }
71 71
72 void BackgroundFetchedEvent::didUpdateUI( 72 void BackgroundFetchedEvent::didUpdateUI(
73 ScriptPromiseResolver* resolver, 73 ScriptPromiseResolver* resolver,
74 mojom::blink::BackgroundFetchError error) { 74 mojom::blink::BackgroundFetchError error) {
75 switch (error) { 75 switch (error) {
76 case mojom::blink::BackgroundFetchError::NONE: 76 case mojom::blink::BackgroundFetchError::NONE:
77 resolver->resolve(); 77 resolver->resolve();
78 return; 78 return;
79 case mojom::blink::BackgroundFetchError::DUPLICATED_TAG: 79 case mojom::blink::BackgroundFetchError::DUPLICATED_TAG:
80 case mojom::blink::BackgroundFetchError::INVALID_ARGUMENT:
80 case mojom::blink::BackgroundFetchError::INVALID_TAG: 81 case mojom::blink::BackgroundFetchError::INVALID_TAG:
81 // Not applicable for this callback. 82 // Not applicable for this callback.
82 break; 83 break;
83 } 84 }
84 85
85 NOTREACHED(); 86 NOTREACHED();
86 } 87 }
87 88
88 const AtomicString& BackgroundFetchedEvent::interfaceName() const { 89 const AtomicString& BackgroundFetchedEvent::interfaceName() const {
89 return EventNames::BackgroundFetchedEvent; 90 return EventNames::BackgroundFetchedEvent;
90 } 91 }
91 92
92 DEFINE_TRACE(BackgroundFetchedEvent) { 93 DEFINE_TRACE(BackgroundFetchedEvent) {
93 visitor->trace(m_fetches); 94 visitor->trace(m_fetches);
94 visitor->trace(m_registration); 95 visitor->trace(m_registration);
95 BackgroundFetchEvent::trace(visitor); 96 BackgroundFetchEvent::trace(visitor);
96 } 97 }
97 98
98 } // namespace blink 99 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698