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

Side by Side Diff: third_party/WebKit/Source/modules/serviceworkers/ServiceWorkerMessageEvent.h

Issue 2308343002: Replaced PassRefPtr copites with moves in Source/modules. (Closed)
Patch Set: Created 4 years, 3 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
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 ServiceWorkerMessageEvent_h 5 #ifndef ServiceWorkerMessageEvent_h
6 #define ServiceWorkerMessageEvent_h 6 #define ServiceWorkerMessageEvent_h
7 7
8 #include "core/dom/DOMArrayBuffer.h" 8 #include "core/dom/DOMArrayBuffer.h"
9 #include "core/dom/MessagePort.h" 9 #include "core/dom/MessagePort.h"
10 #include "modules/EventModules.h" 10 #include "modules/EventModules.h"
11 #include "modules/ModulesExport.h" 11 #include "modules/ModulesExport.h"
12 #include "modules/serviceworkers/ServiceWorkerMessageEventInit.h" 12 #include "modules/serviceworkers/ServiceWorkerMessageEventInit.h"
13 13
14 namespace blink { 14 namespace blink {
15 15
16 class MODULES_EXPORT ServiceWorkerMessageEvent final : public Event { 16 class MODULES_EXPORT ServiceWorkerMessageEvent final : public Event {
17 DEFINE_WRAPPERTYPEINFO(); 17 DEFINE_WRAPPERTYPEINFO();
18 public: 18 public:
19 static ServiceWorkerMessageEvent* create(const AtomicString& type, const Ser viceWorkerMessageEventInit& initializer) 19 static ServiceWorkerMessageEvent* create(const AtomicString& type, const Ser viceWorkerMessageEventInit& initializer)
20 { 20 {
21 return new ServiceWorkerMessageEvent(type, initializer); 21 return new ServiceWorkerMessageEvent(type, initializer);
22 } 22 }
23 23
24 static ServiceWorkerMessageEvent* create(MessagePortArray* ports, PassRefPtr <SerializedScriptValue> data, ServiceWorker* source, const String& origin) 24 static ServiceWorkerMessageEvent* create(MessagePortArray* ports, PassRefPtr <SerializedScriptValue> data, ServiceWorker* source, const String& origin)
25 { 25 {
26 return new ServiceWorkerMessageEvent(data, origin, String(), source, por ts); 26 return new ServiceWorkerMessageEvent(std::move(data), origin, String(), source, ports);
27 } 27 }
28 28
29 ~ServiceWorkerMessageEvent() override; 29 ~ServiceWorkerMessageEvent() override;
30 30
31 SerializedScriptValue* serializedData() const { return m_serializedData.get( ); } 31 SerializedScriptValue* serializedData() const { return m_serializedData.get( ); }
32 void setSerializedData(PassRefPtr<SerializedScriptValue> serializedData) { m _serializedData = serializedData; } 32 void setSerializedData(PassRefPtr<SerializedScriptValue> serializedData) { m _serializedData = serializedData; }
33 const String& origin() const { return m_origin; } 33 const String& origin() const { return m_origin; }
34 const String& lastEventId() const { return m_lastEventId; } 34 const String& lastEventId() const { return m_lastEventId; }
35 MessagePortArray ports(bool& isNull) const; 35 MessagePortArray ports(bool& isNull) const;
36 MessagePortArray ports() const; 36 MessagePortArray ports() const;
(...skipping 11 matching lines...) Expand all
48 String m_origin; 48 String m_origin;
49 String m_lastEventId; 49 String m_lastEventId;
50 Member<ServiceWorker> m_sourceAsServiceWorker; 50 Member<ServiceWorker> m_sourceAsServiceWorker;
51 Member<MessagePort> m_sourceAsMessagePort; 51 Member<MessagePort> m_sourceAsMessagePort;
52 Member<MessagePortArray> m_ports; 52 Member<MessagePortArray> m_ports;
53 }; 53 };
54 54
55 } // namespace blink 55 } // namespace blink
56 56
57 #endif // ServiceWorkerMessageEvent_h 57 #endif // ServiceWorkerMessageEvent_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698