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

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

Issue 1227783004: Fix virtual/override/final usage in Source/modules/. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: rebase Created 5 years, 5 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 | Annotate | Revision Log
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef StashedMessagePort_h 5 #ifndef StashedMessagePort_h
6 #define StashedMessagePort_h 6 #define StashedMessagePort_h
7 7
8 #include "bindings/core/v8/ScriptWrappable.h" 8 #include "bindings/core/v8/ScriptWrappable.h"
9 #include "core/dom/MessagePort.h" 9 #include "core/dom/MessagePort.h"
10 #include "modules/ModulesExport.h" 10 #include "modules/ModulesExport.h"
11 11
12 namespace blink { 12 namespace blink {
13 class ExecutionContext; 13 class ExecutionContext;
14 class StashedMessagePort; 14 class StashedMessagePort;
15 15
16 using StashedMessagePortArray = HeapVector<Member<StashedMessagePort>, 1>; 16 using StashedMessagePortArray = HeapVector<Member<StashedMessagePort>, 1>;
17 17
18 // Represents a message port that has been stashed. Overrides messageAvailable 18 // Represents a message port that has been stashed. Overrides messageAvailable
19 // to dispatch messages as a global event instead of as events on this port. 19 // to dispatch messages as a global event instead of as events on this port.
20 class MODULES_EXPORT StashedMessagePort final : public MessagePort { 20 class MODULES_EXPORT StashedMessagePort final : public MessagePort {
21 DEFINE_WRAPPERTYPEINFO(); 21 DEFINE_WRAPPERTYPEINFO();
22 WTF_MAKE_NONCOPYABLE(StashedMessagePort); 22 WTF_MAKE_NONCOPYABLE(StashedMessagePort);
23 public: 23 public:
24 static StashedMessagePort* create(ExecutionContext&, PassOwnPtr<WebMessagePo rtChannel>, const String& name); 24 static StashedMessagePort* create(ExecutionContext&, PassOwnPtr<WebMessagePo rtChannel>, const String& name);
25 virtual ~StashedMessagePort(); 25 ~StashedMessagePort() override;
26 26
27 static StashedMessagePortArray* toStashedMessagePortArray(ExecutionContext*, const WebMessagePortChannelArray&, const WebVector<WebString>& channelKeys); 27 static StashedMessagePortArray* toStashedMessagePortArray(ExecutionContext*, const WebMessagePortChannelArray&, const WebVector<WebString>& channelKeys);
28 28
29 // StashedMessagePort.idl 29 // StashedMessagePort.idl
30 String name() const; 30 String name() const;
31 31
32 DEFINE_INLINE_VIRTUAL_TRACE() { MessagePort::trace(visitor); } 32 DEFINE_INLINE_VIRTUAL_TRACE() { MessagePort::trace(visitor); }
33 33
34 private: 34 private:
35 StashedMessagePort(ExecutionContext&, PassOwnPtr<WebMessagePortChannel>, con st String& name); 35 StashedMessagePort(ExecutionContext&, PassOwnPtr<WebMessagePortChannel>, con st String& name);
36 36
37 void messageAvailable() override; 37 void messageAvailable() override;
38 void dispatchMessages(); 38 void dispatchMessages();
39 39
40 String m_name; 40 String m_name;
41 WeakPtrFactory<StashedMessagePort> m_weakFactory; 41 WeakPtrFactory<StashedMessagePort> m_weakFactory;
42 }; 42 };
43 43
44 } // namespace blink 44 } // namespace blink
45 45
46 #endif // StashedMessagePort_h 46 #endif // StashedMessagePort_h
OLDNEW
« no previous file with comments | « Source/modules/serviceworkers/ServiceWorkerThread.h ('k') | Source/modules/serviceworkers/StashedPortCollection.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698