Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(286)

Side by Side Diff: Source/modules/serviceworkers/ServiceWorkerRegistration.h

Issue 413123002: ServiceWorker: Implement ServiceWorkerRegistration [1/3] (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: fix for falken's comment Created 6 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 #ifndef ServiceWorkerRegistration_h
6 #define ServiceWorkerRegistration_h
7
8 #include "core/dom/ActiveDOMObject.h"
9 #include "core/events/EventTarget.h"
10 #include "public/platform/WebServiceWorkerRegistration.h"
11 #include "wtf/OwnPtr.h"
12 #include "wtf/PassOwnPtr.h"
13 #include "wtf/PassRefPtr.h"
14 #include "wtf/RefCounted.h"
15
16 namespace blink {
17
18 class ScriptPromise;
19 class ScriptPromiseResolver;
20 class ScriptState;
21 class WebServiceWorkerProvider;
22
23 class ServiceWorkerRegistration FINAL
24 : public RefCountedWillBeRefCountedGarbageCollected<ServiceWorkerRegistratio n>
25 , public ActiveDOMObject
26 , public EventTargetWithInlineData {
27 REFCOUNTED_EVENT_TARGET(ServiceWorkerRegistration);
28 WILL_BE_USING_GARBAGE_COLLECTED_MIXIN(ServiceWorkerRegistration);
29 public:
30 virtual ~ServiceWorkerRegistration() { }
31
32 // EventTarget override.
33 virtual const AtomicString& interfaceName() const OVERRIDE;
34 virtual ExecutionContext* executionContext() const OVERRIDE { return ActiveD OMObject::executionContext(); }
35
36 // For CallbackPromiseAdapter.
37 typedef blink::WebServiceWorkerRegistration WebType;
tkent 2014/07/25 07:50:24 Remove blink::
nhiroki 2014/07/25 08:28:56 Done.
38 static PassRefPtrWillBeRawPtr<ServiceWorkerRegistration> from(ScriptPromiseR esolver*, WebType* registration);
39
40 static PassRefPtrWillBeRawPtr<ServiceWorkerRegistration> from(ExecutionConte xt*, WebType*);
41
42 String scope() const;
43
44 ScriptPromise unregister(ScriptState*);
45
46 private:
47 static PassRefPtrWillBeRawPtr<ServiceWorkerRegistration> create(ExecutionCon text*, PassOwnPtr<blink::WebServiceWorkerRegistration>);
48 ServiceWorkerRegistration(ExecutionContext*, PassOwnPtr<blink::WebServiceWor kerRegistration>);
tkent 2014/07/25 07:50:24 Remove blink::
nhiroki 2014/07/25 08:28:56 Done.
49
50 OwnPtr<blink::WebServiceWorkerRegistration> m_outerRegistration;
tkent 2014/07/25 07:50:24 Remove blink::
nhiroki 2014/07/25 08:28:56 Done.
51 blink::WebServiceWorkerProvider* m_provider;
tkent 2014/07/25 07:50:24 Remove blink::
nhiroki 2014/07/25 08:28:56 Done.
52 };
53
54 } // namespace blink
55
56 #endif // ServiceWorkerRegistration_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698