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

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

Issue 1008533005: Initial implementation of stashed message ports, blink side (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: add comment to ServiceWorkerGlobalScope.idl Created 5 years, 7 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 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);
jochen (gone - plz use gerrit) 2015/05/15 15:25:03 also non-copyable
Marijn Kruisselbrink 2015/05/18 18:29:35 Done
25 public:
26 static PassRefPtrWillBeRawPtr<StashedPortCollection> create(ExecutionContext *);
27 virtual ~StashedPortCollection();
28
29 void addPorts(const StashedMessagePortArray&);
30
31 // StashedPortCollection.idl
32 PassRefPtrWillBeRawPtr<StashedMessagePort> add(ScriptState*, const String& n ame, MessagePort*);
33
34 // EventTarget overrides.
35 const AtomicString& interfaceName() const override;
36 ExecutionContext* executionContext() const override;
37
38 DEFINE_ATTRIBUTE_EVENT_LISTENER(message);
39
40 DECLARE_VIRTUAL_TRACE();
41
42 private:
43 explicit StashedPortCollection(ExecutionContext*);
44
45 StashedMessagePortArray m_ports;
46 };
47
48 } // namespace blink
49
50 #endif // StashedPortCollection_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698