| 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/serviceworkers/ServiceWorkerClients.h" | 5 #include "modules/serviceworkers/ServiceWorkerClients.h" |
| 6 | 6 |
| 7 #include <memory> |
| 8 #include <utility> |
| 7 #include "bindings/core/v8/CallbackPromiseAdapter.h" | 9 #include "bindings/core/v8/CallbackPromiseAdapter.h" |
| 8 #include "bindings/core/v8/ScriptPromiseResolver.h" | 10 #include "bindings/core/v8/ScriptPromiseResolver.h" |
| 9 #include "core/dom/DOMException.h" | 11 #include "core/dom/DOMException.h" |
| 10 #include "core/dom/ExceptionCode.h" | 12 #include "core/dom/ExceptionCode.h" |
| 11 #include "core/workers/WorkerGlobalScope.h" | 13 #include "core/workers/WorkerGlobalScope.h" |
| 12 #include "core/workers/WorkerLocation.h" | 14 #include "core/workers/WorkerLocation.h" |
| 13 #include "modules/serviceworkers/ServiceWorkerError.h" | 15 #include "modules/serviceworkers/ServiceWorkerError.h" |
| 14 #include "modules/serviceworkers/ServiceWorkerGlobalScopeClient.h" | 16 #include "modules/serviceworkers/ServiceWorkerGlobalScopeClient.h" |
| 15 #include "modules/serviceworkers/ServiceWorkerWindowClient.h" | 17 #include "modules/serviceworkers/ServiceWorkerWindowClient.h" |
| 16 #include "modules/serviceworkers/ServiceWorkerWindowClientCallback.h" | 18 #include "modules/serviceworkers/ServiceWorkerWindowClientCallback.h" |
| 17 #include "public/platform/modules/serviceworker/WebServiceWorkerClientQueryOptio
ns.h" | 19 #include "public/platform/modules/serviceworker/WebServiceWorkerClientQueryOptio
ns.h" |
| 18 #include "public/platform/modules/serviceworker/WebServiceWorkerClientsInfo.h" | 20 #include "public/platform/modules/serviceworker/WebServiceWorkerClientsInfo.h" |
| 19 #include "wtf/PtrUtil.h" | 21 #include "wtf/PtrUtil.h" |
| 20 #include "wtf/RefPtr.h" | 22 #include "wtf/RefPtr.h" |
| 21 #include "wtf/Vector.h" | 23 #include "wtf/Vector.h" |
| 22 #include <memory> | |
| 23 #include <utility> | |
| 24 | 24 |
| 25 namespace blink { | 25 namespace blink { |
| 26 | 26 |
| 27 namespace { | 27 namespace { |
| 28 | 28 |
| 29 class ClientArray { | 29 class ClientArray { |
| 30 public: | 30 public: |
| 31 using WebType = const WebServiceWorkerClientsInfo&; | 31 using WebType = const WebServiceWorkerClientsInfo&; |
| 32 static HeapVector<Member<ServiceWorkerClient>> take( | 32 static HeapVector<Member<ServiceWorkerClient>> take( |
| 33 ScriptPromiseResolver*, | 33 ScriptPromiseResolver*, |
| (...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 185 return promise; | 185 return promise; |
| 186 } | 186 } |
| 187 context->consumeWindowInteraction(); | 187 context->consumeWindowInteraction(); |
| 188 | 188 |
| 189 ServiceWorkerGlobalScopeClient::from(context)->openWindow( | 189 ServiceWorkerGlobalScopeClient::from(context)->openWindow( |
| 190 parsedUrl, WTF::makeUnique<NavigateClientCallback>(resolver)); | 190 parsedUrl, WTF::makeUnique<NavigateClientCallback>(resolver)); |
| 191 return promise; | 191 return promise; |
| 192 } | 192 } |
| 193 | 193 |
| 194 } // namespace blink | 194 } // namespace blink |
| OLD | NEW |