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 StashedMessagePort_h | |
6 #define StashedMessagePort_h | |
7 | |
8 #include "bindings/core/v8/ScriptWrappable.h" | |
9 #include "core/dom/MessagePort.h" | |
10 | |
11 namespace blink { | |
12 class ExecutionContext; | |
13 class StashedMessagePort; | |
14 | |
15 using StashedMessagePortArray = WillBeHeapVector<RefPtrWillBeMember<StashedMessa gePort>, 1>; | |
jochen (gone - plz use gerrit)
2015/05/15 15:25:03
aren't modules already on oilpan, so you don't nee
Marijn Kruisselbrink
2015/05/18 18:29:35
But StashedMessagePort inherits from MessagePort,
| |
16 | |
17 // Represents a message port that has been stashed. Overrides messageAvailable | |
18 // to dispatch messages as a global event instead of as events on this port. | |
19 class StashedMessagePort final | |
20 : public MessagePort { | |
jochen (gone - plz use gerrit)
2015/05/15 15:25:03
nit. on previous line
Marijn Kruisselbrink
2015/05/18 18:29:35
Done
| |
21 DEFINE_WRAPPERTYPEINFO(); | |
jochen (gone - plz use gerrit)
2015/05/15 15:25:03
WTF_MAKE_NONCOPYABLE?
Marijn Kruisselbrink
2015/05/18 18:29:35
Done
| |
22 public: | |
23 static PassRefPtrWillBeRawPtr<StashedMessagePort> create(ExecutionContext&, PassOwnPtr<WebMessagePortChannel>, const String& name); | |
24 virtual ~StashedMessagePort(); | |
25 | |
26 static PassOwnPtrWillBeRawPtr<StashedMessagePortArray> toStashedMessagePortA rray(ExecutionContext*, const WebMessagePortChannelArray&, const WebVector<WebSt ring>& channelKeys); | |
27 | |
28 // StashedMessagePort.idl | |
29 String name() const; | |
30 | |
31 DEFINE_INLINE_VIRTUAL_TRACE() { MessagePort::trace(visitor); } | |
32 | |
33 private: | |
34 void messageAvailable() override; | |
35 void dispatchMessages(); | |
36 | |
37 explicit StashedMessagePort(ExecutionContext&, PassOwnPtr<WebMessagePortChan nel>, const String& name); | |
jochen (gone - plz use gerrit)
2015/05/15 15:25:03
no explicit, should also come before other private
Marijn Kruisselbrink
2015/05/18 18:29:35
Done
| |
38 | |
39 String m_name; | |
40 WeakPtrFactory<StashedMessagePort> m_weakFactory; | |
41 }; | |
42 | |
43 } // namespace blink | |
44 | |
45 #endif // StashedMessagePort_h | |
OLD | NEW |