Index: Source/modules/serviceworkers/ServiceWorkerRegistration.h |
diff --git a/Source/modules/serviceworkers/ServiceWorkerRegistration.h b/Source/modules/serviceworkers/ServiceWorkerRegistration.h |
new file mode 100644 |
index 0000000000000000000000000000000000000000..0fbdd3a3925a732172b439ec3d21f086560078db |
--- /dev/null |
+++ b/Source/modules/serviceworkers/ServiceWorkerRegistration.h |
@@ -0,0 +1,56 @@ |
+// Copyright 2014 The Chromium Authors. All rights reserved. |
+// Use of this source code is governed by a BSD-style license that can be |
+// found in the LICENSE file. |
+ |
+#ifndef ServiceWorkerRegistration_h |
+#define ServiceWorkerRegistration_h |
+ |
+#include "core/dom/ActiveDOMObject.h" |
+#include "core/events/EventTarget.h" |
+#include "public/platform/WebServiceWorkerRegistration.h" |
+#include "wtf/OwnPtr.h" |
+#include "wtf/PassOwnPtr.h" |
+#include "wtf/PassRefPtr.h" |
+#include "wtf/RefCounted.h" |
+ |
+namespace blink { |
+ |
+class ScriptPromise; |
+class ScriptPromiseResolver; |
+class ScriptState; |
+class WebServiceWorkerProvider; |
+ |
+class ServiceWorkerRegistration FINAL |
+ : public RefCountedWillBeRefCountedGarbageCollected<ServiceWorkerRegistration> |
+ , public ActiveDOMObject |
+ , public EventTargetWithInlineData { |
+ REFCOUNTED_EVENT_TARGET(ServiceWorkerRegistration); |
+ WILL_BE_USING_GARBAGE_COLLECTED_MIXIN(ServiceWorkerRegistration); |
+public: |
+ virtual ~ServiceWorkerRegistration() { } |
+ |
+ // EventTarget override. |
+ virtual const AtomicString& interfaceName() const OVERRIDE; |
+ virtual ExecutionContext* executionContext() const OVERRIDE { return ActiveDOMObject::executionContext(); } |
+ |
+ // For CallbackPromiseAdapter. |
+ typedef blink::WebServiceWorkerRegistration WebType; |
tkent
2014/07/25 07:50:24
Remove blink::
nhiroki
2014/07/25 08:28:56
Done.
|
+ static PassRefPtrWillBeRawPtr<ServiceWorkerRegistration> from(ScriptPromiseResolver*, WebType* registration); |
+ |
+ static PassRefPtrWillBeRawPtr<ServiceWorkerRegistration> from(ExecutionContext*, WebType*); |
+ |
+ String scope() const; |
+ |
+ ScriptPromise unregister(ScriptState*); |
+ |
+private: |
+ static PassRefPtrWillBeRawPtr<ServiceWorkerRegistration> create(ExecutionContext*, PassOwnPtr<blink::WebServiceWorkerRegistration>); |
+ ServiceWorkerRegistration(ExecutionContext*, PassOwnPtr<blink::WebServiceWorkerRegistration>); |
tkent
2014/07/25 07:50:24
Remove blink::
nhiroki
2014/07/25 08:28:56
Done.
|
+ |
+ OwnPtr<blink::WebServiceWorkerRegistration> m_outerRegistration; |
tkent
2014/07/25 07:50:24
Remove blink::
nhiroki
2014/07/25 08:28:56
Done.
|
+ blink::WebServiceWorkerProvider* m_provider; |
tkent
2014/07/25 07:50:24
Remove blink::
nhiroki
2014/07/25 08:28:56
Done.
|
+}; |
+ |
+} // namespace blink |
+ |
+#endif // ServiceWorkerRegistration_h |