OLD | NEW |
---|---|
(Empty) | |
1 // Copyright 2015 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 StashedPortCollection_h | |
6 #define StashedPortCollection_h | |
7 | |
8 #include "core/dom/ContextLifecycleObserver.h" | |
9 #include "core/events/EventTarget.h" | |
10 #include "modules/serviceworkers/StashedMessagePort.h" | |
11 #include "wtf/RefCounted.h" | |
12 | |
13 namespace blink { | |
14 class ScriptState; | |
15 class ScriptValue; | |
16 class ServiceWorkerGlobalScope; | |
17 | |
18 class StashedPortCollection final | |
19 : public EventTargetWithInlineData | |
20 , public RefCountedWillBeNoBase<StashedPortCollection> | |
21 , public ContextLifecycleObserver { | |
22 DEFINE_WRAPPERTYPEINFO(); | |
23 REFCOUNTED_EVENT_TARGET(StashedPortCollection); | |
24 WILL_BE_USING_GARBAGE_COLLECTED_MIXIN(StashedPortCollection); | |
25 public: | |
26 static PassRefPtrWillBeRawPtr<StashedPortCollection> create(ExecutionContext *); | |
27 virtual ~StashedPortCollection(); | |
28 | |
29 PassRefPtrWillBeRawPtr<StashedMessagePort> add(ScriptState*, const String& n ame, MessagePort*); | |
scheib
2015/05/06 21:44:31
// StashedPortCollection.idl, then methods impleme
Marijn Kruisselbrink
2015/05/12 06:56:41
Done.
| |
30 | |
31 void addPorts(const StashedMessagePortArray&); | |
32 | |
33 const AtomicString& interfaceName() const override; | |
scheib
2015/05/06 21:44:31
What interface is this implementing?
Marijn Kruisselbrink
2015/05/12 06:56:41
Done.
| |
34 ExecutionContext* executionContext() const override; | |
35 | |
36 DEFINE_ATTRIBUTE_EVENT_LISTENER(message); | |
37 | |
38 DECLARE_VIRTUAL_TRACE(); | |
39 | |
40 private: | |
41 explicit StashedPortCollection(ExecutionContext*); | |
42 | |
43 StashedMessagePortArray m_ports; | |
44 }; | |
45 | |
46 } // namespace blink | |
47 | |
48 #endif // StashedPortCollection_h | |
OLD | NEW |