Index: Source/modules/serviceworkers/StashedPortCollection.h |
diff --git a/Source/modules/serviceworkers/StashedPortCollection.h b/Source/modules/serviceworkers/StashedPortCollection.h |
new file mode 100644 |
index 0000000000000000000000000000000000000000..c7780a5253f9e914ba199f4c7942878b08ebeeb4 |
--- /dev/null |
+++ b/Source/modules/serviceworkers/StashedPortCollection.h |
@@ -0,0 +1,48 @@ |
+// Copyright 2015 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 StashedPortCollection_h |
+#define StashedPortCollection_h |
+ |
+#include "core/dom/ContextLifecycleObserver.h" |
+#include "core/events/EventTarget.h" |
+#include "modules/serviceworkers/StashedMessagePort.h" |
+#include "wtf/RefCounted.h" |
+ |
+namespace blink { |
+class ScriptState; |
+class ScriptValue; |
+class ServiceWorkerGlobalScope; |
+ |
+class StashedPortCollection final |
+ : public EventTargetWithInlineData |
+ , public RefCountedWillBeNoBase<StashedPortCollection> |
+ , public ContextLifecycleObserver { |
+ DEFINE_WRAPPERTYPEINFO(); |
+ REFCOUNTED_EVENT_TARGET(StashedPortCollection); |
+ WILL_BE_USING_GARBAGE_COLLECTED_MIXIN(StashedPortCollection); |
+public: |
+ static PassRefPtrWillBeRawPtr<StashedPortCollection> create(ExecutionContext*); |
+ virtual ~StashedPortCollection(); |
+ |
+ PassRefPtrWillBeRawPtr<StashedMessagePort> add(ScriptState*, const String& name, MessagePort*); |
scheib
2015/05/06 21:44:31
// StashedPortCollection.idl, then methods impleme
Marijn Kruisselbrink
2015/05/12 06:56:41
Done.
|
+ |
+ void addPorts(const StashedMessagePortArray&); |
+ |
+ 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.
|
+ ExecutionContext* executionContext() const override; |
+ |
+ DEFINE_ATTRIBUTE_EVENT_LISTENER(message); |
+ |
+ DECLARE_VIRTUAL_TRACE(); |
+ |
+private: |
+ explicit StashedPortCollection(ExecutionContext*); |
+ |
+ StashedMessagePortArray m_ports; |
+}; |
+ |
+} // namespace blink |
+ |
+#endif // StashedPortCollection_h |