| 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/PushManager.h" | 5 #include "modules/push_messaging/PushManager.h" |
| 6 | 6 |
| 7 #include "bindings/core/v8/ScriptPromise.h" | 7 #include "bindings/core/v8/ScriptPromise.h" |
| 8 #include "bindings/core/v8/ScriptPromiseResolver.h" | 8 #include "bindings/core/v8/ScriptPromiseResolver.h" |
| 9 #include "bindings/core/v8/ScriptState.h" | 9 #include "bindings/core/v8/ScriptState.h" |
| 10 #include "core/dom/DOMException.h" | 10 #include "core/dom/DOMException.h" |
| 11 #include "core/dom/Document.h" | 11 #include "core/dom/Document.h" |
| 12 #include "core/dom/ExceptionCode.h" | 12 #include "core/dom/ExceptionCode.h" |
| 13 #include "core/dom/ExecutionContext.h" | 13 #include "core/dom/ExecutionContext.h" |
| 14 #include "modules/push_messaging/PushController.h" | 14 #include "modules/push_messaging/PushController.h" |
| 15 #include "modules/push_messaging/PushError.h" | 15 #include "modules/push_messaging/PushError.h" |
| 16 #include "modules/push_messaging/PushPermissionStatusCallbacks.h" | 16 #include "modules/push_messaging/PushPermissionStatusCallbacks.h" |
| 17 #include "modules/push_messaging/PushSubscription.h" | 17 #include "modules/push_messaging/PushSubscription.h" |
| 18 #include "modules/push_messaging/PushSubscriptionCallbacks.h" | 18 #include "modules/push_messaging/PushSubscriptionCallbacks.h" |
| 19 #include "modules/push_messaging/PushSubscriptionOptions.h" | 19 #include "modules/push_messaging/PushSubscriptionOptions.h" |
| 20 #include "modules/push_messaging/PushSubscriptionOptionsInit.h" | 20 #include "modules/push_messaging/PushSubscriptionOptionsInit.h" |
| 21 #include "modules/serviceworkers/ServiceWorkerRegistration.h" | 21 #include "modules/serviceworkers/ServiceWorkerRegistration.h" |
| 22 #include "platform/wtf/Assertions.h" |
| 23 #include "platform/wtf/RefPtr.h" |
| 22 #include "public/platform/Platform.h" | 24 #include "public/platform/Platform.h" |
| 23 #include "public/platform/modules/push_messaging/WebPushClient.h" | 25 #include "public/platform/modules/push_messaging/WebPushClient.h" |
| 24 #include "public/platform/modules/push_messaging/WebPushProvider.h" | 26 #include "public/platform/modules/push_messaging/WebPushProvider.h" |
| 25 #include "public/platform/modules/push_messaging/WebPushSubscriptionOptions.h" | 27 #include "public/platform/modules/push_messaging/WebPushSubscriptionOptions.h" |
| 26 #include "wtf/Assertions.h" | |
| 27 #include "wtf/RefPtr.h" | |
| 28 | 28 |
| 29 namespace blink { | 29 namespace blink { |
| 30 namespace { | 30 namespace { |
| 31 | 31 |
| 32 WebPushProvider* PushProvider() { | 32 WebPushProvider* PushProvider() { |
| 33 WebPushProvider* web_push_provider = Platform::Current()->PushProvider(); | 33 WebPushProvider* web_push_provider = Platform::Current()->PushProvider(); |
| 34 DCHECK(web_push_provider); | 34 DCHECK(web_push_provider); |
| 35 return web_push_provider; | 35 return web_push_provider; |
| 36 } | 36 } |
| 37 | 37 |
| (...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 113 PushSubscriptionOptions::ToWeb(options, exception_state), | 113 PushSubscriptionOptions::ToWeb(options, exception_state), |
| 114 WTF::MakeUnique<PushPermissionStatusCallbacks>(resolver)); | 114 WTF::MakeUnique<PushPermissionStatusCallbacks>(resolver)); |
| 115 return promise; | 115 return promise; |
| 116 } | 116 } |
| 117 | 117 |
| 118 DEFINE_TRACE(PushManager) { | 118 DEFINE_TRACE(PushManager) { |
| 119 visitor->Trace(registration_); | 119 visitor->Trace(registration_); |
| 120 } | 120 } |
| 121 | 121 |
| 122 } // namespace blink | 122 } // namespace blink |
| OLD | NEW |