| 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 #ifndef ServiceWorkerRegistration_h | 5 #ifndef ServiceWorkerRegistration_h |
| 6 #define ServiceWorkerRegistration_h | 6 #define ServiceWorkerRegistration_h |
| 7 | 7 |
| 8 #include "bindings/core/v8/ActiveScriptWrappable.h" | 8 #include "bindings/core/v8/ActiveScriptWrappable.h" |
| 9 #include "bindings/core/v8/ScriptPromiseResolver.h" | 9 #include "bindings/core/v8/ScriptPromiseResolver.h" |
| 10 #include "core/dom/ActiveDOMObject.h" | 10 #include "core/dom/ActiveDOMObject.h" |
| (...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 87 bool m_stopped; | 87 bool m_stopped; |
| 88 }; | 88 }; |
| 89 | 89 |
| 90 class ServiceWorkerRegistrationArray { | 90 class ServiceWorkerRegistrationArray { |
| 91 STATIC_ONLY(ServiceWorkerRegistrationArray); | 91 STATIC_ONLY(ServiceWorkerRegistrationArray); |
| 92 public: | 92 public: |
| 93 static HeapVector<Member<ServiceWorkerRegistration>> take(ScriptPromiseResol
ver* resolver, Vector<OwnPtr<WebServiceWorkerRegistration::Handle>>* webServiceW
orkerRegistrations) | 93 static HeapVector<Member<ServiceWorkerRegistration>> take(ScriptPromiseResol
ver* resolver, Vector<OwnPtr<WebServiceWorkerRegistration::Handle>>* webServiceW
orkerRegistrations) |
| 94 { | 94 { |
| 95 HeapVector<Member<ServiceWorkerRegistration>> registrations; | 95 HeapVector<Member<ServiceWorkerRegistration>> registrations; |
| 96 for (auto& registration : *webServiceWorkerRegistrations) | 96 for (auto& registration : *webServiceWorkerRegistrations) |
| 97 registrations.append(ServiceWorkerRegistration::getOrCreate(resolver
->getExecutionContext(), registration.release())); | 97 registrations.append(ServiceWorkerRegistration::getOrCreate(resolver
->getExecutionContext(), std::move(registration))); |
| 98 return registrations; | 98 return registrations; |
| 99 } | 99 } |
| 100 }; | 100 }; |
| 101 | 101 |
| 102 } // namespace blink | 102 } // namespace blink |
| 103 | 103 |
| 104 #endif // ServiceWorkerRegistration_h | 104 #endif // ServiceWorkerRegistration_h |
| OLD | NEW |