| OLD | NEW |
| 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/PushSubscription.h" | 5 #include "modules/push_messaging/PushSubscription.h" |
| 6 | 6 |
| 7 #include <memory> |
| 7 #include "bindings/core/v8/CallbackPromiseAdapter.h" | 8 #include "bindings/core/v8/CallbackPromiseAdapter.h" |
| 8 #include "bindings/core/v8/ScriptPromiseResolver.h" | 9 #include "bindings/core/v8/ScriptPromiseResolver.h" |
| 9 #include "bindings/core/v8/V8ObjectBuilder.h" | 10 #include "bindings/core/v8/V8ObjectBuilder.h" |
| 10 #include "modules/push_messaging/PushError.h" | 11 #include "modules/push_messaging/PushError.h" |
| 11 #include "modules/push_messaging/PushSubscriptionOptions.h" | 12 #include "modules/push_messaging/PushSubscriptionOptions.h" |
| 12 #include "modules/serviceworkers/ServiceWorkerRegistration.h" | 13 #include "modules/serviceworkers/ServiceWorkerRegistration.h" |
| 14 #include "platform/wtf/Assertions.h" |
| 15 #include "platform/wtf/text/Base64.h" |
| 13 #include "public/platform/Platform.h" | 16 #include "public/platform/Platform.h" |
| 14 #include "public/platform/modules/push_messaging/WebPushProvider.h" | 17 #include "public/platform/modules/push_messaging/WebPushProvider.h" |
| 15 #include "public/platform/modules/push_messaging/WebPushSubscription.h" | 18 #include "public/platform/modules/push_messaging/WebPushSubscription.h" |
| 16 #include "wtf/Assertions.h" | |
| 17 #include "wtf/text/Base64.h" | |
| 18 #include <memory> | |
| 19 | 19 |
| 20 namespace blink { | 20 namespace blink { |
| 21 | 21 |
| 22 PushSubscription* PushSubscription::Take( | 22 PushSubscription* PushSubscription::Take( |
| 23 ScriptPromiseResolver*, | 23 ScriptPromiseResolver*, |
| 24 std::unique_ptr<WebPushSubscription> push_subscription, | 24 std::unique_ptr<WebPushSubscription> push_subscription, |
| 25 ServiceWorkerRegistration* service_worker_registration) { | 25 ServiceWorkerRegistration* service_worker_registration) { |
| 26 if (!push_subscription) | 26 if (!push_subscription) |
| 27 return nullptr; | 27 return nullptr; |
| 28 return new PushSubscription(*push_subscription, service_worker_registration); | 28 return new PushSubscription(*push_subscription, service_worker_registration); |
| (...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 86 } | 86 } |
| 87 | 87 |
| 88 DEFINE_TRACE(PushSubscription) { | 88 DEFINE_TRACE(PushSubscription) { |
| 89 visitor->Trace(options_); | 89 visitor->Trace(options_); |
| 90 visitor->Trace(p256dh_); | 90 visitor->Trace(p256dh_); |
| 91 visitor->Trace(auth_); | 91 visitor->Trace(auth_); |
| 92 visitor->Trace(service_worker_registration_); | 92 visitor->Trace(service_worker_registration_); |
| 93 } | 93 } |
| 94 | 94 |
| 95 } // namespace blink | 95 } // namespace blink |
| OLD | NEW |