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

Side by Side Diff: Source/modules/serviceworkers/ServiceWorkerMessageEvent.cpp

Issue 1212643004: [Oilpan] Apply RefCountedGarbageCollectedEventTarget on AbstractWorker (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Remove some redundant includes Created 5 years, 4 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 #include "config.h" 5 #include "config.h"
6 #include "modules/serviceworkers/ServiceWorkerMessageEvent.h" 6 #include "modules/serviceworkers/ServiceWorkerMessageEvent.h"
7 7
8 namespace blink { 8 namespace blink {
9 9
10 ServiceWorkerMessageEvent::ServiceWorkerMessageEvent() 10 ServiceWorkerMessageEvent::ServiceWorkerMessageEvent()
(...skipping 12 matching lines...) Expand all
23 m_sourceAsServiceWorker = initializer.source().getAsServiceWorker(); 23 m_sourceAsServiceWorker = initializer.source().getAsServiceWorker();
24 else if (initializer.source().isMessagePort()) 24 else if (initializer.source().isMessagePort())
25 m_sourceAsMessagePort = initializer.source().getAsMessagePort(); 25 m_sourceAsMessagePort = initializer.source().getAsMessagePort();
26 } 26 }
27 if (initializer.hasPorts()) 27 if (initializer.hasPorts())
28 m_ports = new MessagePortArray(initializer.ports()); 28 m_ports = new MessagePortArray(initializer.ports());
29 if (initializer.hasData()) 29 if (initializer.hasData())
30 m_data = initializer.data(); 30 m_data = initializer.data();
31 } 31 }
32 32
33 ServiceWorkerMessageEvent::ServiceWorkerMessageEvent(PassRefPtr<SerializedScript Value> data, const String& origin, const String& lastEventId, PassRefPtrWillBeRa wPtr<ServiceWorker> source, MessagePortArray* ports) 33 ServiceWorkerMessageEvent::ServiceWorkerMessageEvent(PassRefPtr<SerializedScript Value> data, const String& origin, const String& lastEventId, ServiceWorker* sou rce, MessagePortArray* ports)
34 : Event(EventTypeNames::message, false, false) 34 : Event(EventTypeNames::message, false, false)
35 , m_serializedData(data) 35 , m_serializedData(data)
36 , m_origin(origin) 36 , m_origin(origin)
37 , m_lastEventId(lastEventId) 37 , m_lastEventId(lastEventId)
38 , m_sourceAsServiceWorker(source) 38 , m_sourceAsServiceWorker(source)
39 , m_ports(ports) 39 , m_ports(ports)
40 { 40 {
41 if (m_serializedData) 41 if (m_serializedData)
42 m_serializedData->registerMemoryAllocatedWithCurrentScriptContext(); 42 m_serializedData->registerMemoryAllocatedWithCurrentScriptContext();
43 } 43 }
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
77 77
78 DEFINE_TRACE(ServiceWorkerMessageEvent) 78 DEFINE_TRACE(ServiceWorkerMessageEvent)
79 { 79 {
80 visitor->trace(m_sourceAsServiceWorker); 80 visitor->trace(m_sourceAsServiceWorker);
81 visitor->trace(m_sourceAsMessagePort); 81 visitor->trace(m_sourceAsMessagePort);
82 visitor->trace(m_ports); 82 visitor->trace(m_ports);
83 Event::trace(visitor); 83 Event::trace(visitor);
84 } 84 }
85 85
86 } // namespace blink 86 } // namespace blink
OLDNEW
« no previous file with comments | « Source/modules/serviceworkers/ServiceWorkerMessageEvent.h ('k') | Source/modules/serviceworkers/ServiceWorkerRegistration.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698