Chromium Code Reviews| 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 typedef WillBeHeapVector<RefPtrWillBeMember<StashedMessagePort>, 1> StashedMessa gePortArray; | |
| 16 | |
| 17 class StashedMessagePort final | |
|
scheib
2015/05/06 21:44:31
Class comment
Marijn Kruisselbrink
2015/05/12 06:56:40
Done.
| |
| 18 : public MessagePort { | |
| 19 DEFINE_WRAPPERTYPEINFO(); | |
| 20 public: | |
| 21 static PassRefPtrWillBeRawPtr<StashedMessagePort> create(ExecutionContext&, PassOwnPtr<WebMessagePortChannel>, const String& name); | |
| 22 virtual ~StashedMessagePort(); | |
| 23 | |
| 24 static PassOwnPtrWillBeRawPtr<StashedMessagePortArray> toStashedMessagePortA rray(ExecutionContext*, const WebMessagePortChannelArray&, const WebVector<WebSt ring>& channelKeys); | |
| 25 | |
| 26 String name() const; | |
|
scheib
2015/05/06 21:44:31
// StashedMessagePort.idl
Marijn Kruisselbrink
2015/05/12 06:56:40
Done.
| |
| 27 | |
| 28 DECLARE_VIRTUAL_TRACE(); | |
| 29 | |
| 30 private: | |
| 31 void messageAvailable() override; | |
| 32 void dispatchMessages(); | |
| 33 | |
| 34 explicit StashedMessagePort(ExecutionContext&, PassOwnPtr<WebMessagePortChan nel>, const String& name); | |
| 35 | |
| 36 WeakPtrFactory<StashedMessagePort> m_weakFactory; | |
|
scheib
2015/05/06 21:44:30
WeakPtrFactory best practice is as last member to
Marijn Kruisselbrink
2015/05/12 06:56:41
Done.
| |
| 37 String m_name; | |
| 38 }; | |
| 39 | |
| 40 } // namespace blink | |
| 41 | |
| 42 #endif // StashedMessagePort_h | |
| OLD | NEW |