Chromium Code Reviews

Side by Side Diff: third_party/WebKit/Source/modules/push_messaging/PushSubscriptionCallbacks.cpp

Issue 1773813007: blink: Rename modules/ method to prefix with get when they collide. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: clash-modules: rebase-fixes Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View unified diff |
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/push_messaging/PushSubscriptionCallbacks.h" 5 #include "modules/push_messaging/PushSubscriptionCallbacks.h"
6 6
7 #include "bindings/core/v8/ScriptPromiseResolver.h" 7 #include "bindings/core/v8/ScriptPromiseResolver.h"
8 #include "modules/push_messaging/PushError.h" 8 #include "modules/push_messaging/PushError.h"
9 #include "modules/push_messaging/PushSubscription.h" 9 #include "modules/push_messaging/PushSubscription.h"
10 #include "modules/serviceworkers/ServiceWorkerRegistration.h" 10 #include "modules/serviceworkers/ServiceWorkerRegistration.h"
11 #include "public/platform/modules/push_messaging/WebPushSubscription.h" 11 #include "public/platform/modules/push_messaging/WebPushSubscription.h"
12 12
13 namespace blink { 13 namespace blink {
14 14
15 PushSubscriptionCallbacks::PushSubscriptionCallbacks(ScriptPromiseResolver* reso lver, ServiceWorkerRegistration* serviceWorkerRegistration) 15 PushSubscriptionCallbacks::PushSubscriptionCallbacks(ScriptPromiseResolver* reso lver, ServiceWorkerRegistration* serviceWorkerRegistration)
16 : m_resolver(resolver) 16 : m_resolver(resolver)
17 , m_serviceWorkerRegistration(serviceWorkerRegistration) 17 , m_serviceWorkerRegistration(serviceWorkerRegistration)
18 { 18 {
19 ASSERT(m_resolver); 19 ASSERT(m_resolver);
20 ASSERT(m_serviceWorkerRegistration); 20 ASSERT(m_serviceWorkerRegistration);
21 } 21 }
22 22
23 PushSubscriptionCallbacks::~PushSubscriptionCallbacks() 23 PushSubscriptionCallbacks::~PushSubscriptionCallbacks()
24 { 24 {
25 } 25 }
26 26
27 void PushSubscriptionCallbacks::onSuccess(WebPassOwnPtr<WebPushSubscription> web PushSubscription) 27 void PushSubscriptionCallbacks::onSuccess(WebPassOwnPtr<WebPushSubscription> web PushSubscription)
28 { 28 {
29 if (!m_resolver->executionContext() || m_resolver->executionContext()->activ eDOMObjectsAreStopped()) 29 if (!m_resolver->getExecutionContext() || m_resolver->getExecutionContext()- >activeDOMObjectsAreStopped())
30 return; 30 return;
31 31
32 m_resolver->resolve(PushSubscription::take(m_resolver.get(), webPushSubscrip tion.release(), m_serviceWorkerRegistration)); 32 m_resolver->resolve(PushSubscription::take(m_resolver.get(), webPushSubscrip tion.release(), m_serviceWorkerRegistration));
33 } 33 }
34 34
35 void PushSubscriptionCallbacks::onError(const WebPushError& error) 35 void PushSubscriptionCallbacks::onError(const WebPushError& error)
36 { 36 {
37 if (!m_resolver->executionContext() || m_resolver->executionContext()->activ eDOMObjectsAreStopped()) 37 if (!m_resolver->getExecutionContext() || m_resolver->getExecutionContext()- >activeDOMObjectsAreStopped())
38 return; 38 return;
39 m_resolver->reject(PushError::take(m_resolver.get(), error)); 39 m_resolver->reject(PushError::take(m_resolver.get(), error));
40 } 40 }
41 41
42 } // namespace blink 42 } // namespace blink
OLDNEW

Powered by Google App Engine