| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2011 Google Inc. All rights reserved. | 2 * Copyright (C) 2011 Google Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions | 5 * modification, are permitted provided that the following conditions |
| 6 * are met: | 6 * are met: |
| 7 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
| 8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
| 9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
| 10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
| (...skipping 14 matching lines...) Expand all Loading... |
| 25 #include "config.h" | 25 #include "config.h" |
| 26 #include "modules/mediastream/MediaStreamEvent.h" | 26 #include "modules/mediastream/MediaStreamEvent.h" |
| 27 | 27 |
| 28 namespace WebCore { | 28 namespace WebCore { |
| 29 | 29 |
| 30 MediaStreamEventInit::MediaStreamEventInit() | 30 MediaStreamEventInit::MediaStreamEventInit() |
| 31 : stream(nullptr) | 31 : stream(nullptr) |
| 32 { | 32 { |
| 33 } | 33 } |
| 34 | 34 |
| 35 PassRefPtr<MediaStreamEvent> MediaStreamEvent::create() | 35 PassRefPtrWillBeRawPtr<MediaStreamEvent> MediaStreamEvent::create() |
| 36 { | 36 { |
| 37 return adoptRef(new MediaStreamEvent); | 37 return adoptRefWillBeRefCountedGarbageCollected(new MediaStreamEvent); |
| 38 } | 38 } |
| 39 | 39 |
| 40 PassRefPtr<MediaStreamEvent> MediaStreamEvent::create(const AtomicString& type,
bool canBubble, bool cancelable, PassRefPtr<MediaStream> stream) | 40 PassRefPtrWillBeRawPtr<MediaStreamEvent> MediaStreamEvent::create(const AtomicSt
ring& type, bool canBubble, bool cancelable, PassRefPtr<MediaStream> stream) |
| 41 { | 41 { |
| 42 return adoptRef(new MediaStreamEvent(type, canBubble, cancelable, stream)); | 42 return adoptRefWillBeRefCountedGarbageCollected(new MediaStreamEvent(type, c
anBubble, cancelable, stream)); |
| 43 } | 43 } |
| 44 | 44 |
| 45 PassRefPtr<MediaStreamEvent> MediaStreamEvent::create(const AtomicString& type,
const MediaStreamEventInit& initializer) | 45 PassRefPtrWillBeRawPtr<MediaStreamEvent> MediaStreamEvent::create(const AtomicSt
ring& type, const MediaStreamEventInit& initializer) |
| 46 { | 46 { |
| 47 return adoptRef(new MediaStreamEvent(type, initializer)); | 47 return adoptRefWillBeRefCountedGarbageCollected(new MediaStreamEvent(type, i
nitializer)); |
| 48 } | 48 } |
| 49 | 49 |
| 50 MediaStreamEvent::MediaStreamEvent() | 50 MediaStreamEvent::MediaStreamEvent() |
| 51 { | 51 { |
| 52 ScriptWrappable::init(this); | 52 ScriptWrappable::init(this); |
| 53 } | 53 } |
| 54 | 54 |
| 55 MediaStreamEvent::MediaStreamEvent(const AtomicString& type, bool canBubble, boo
l cancelable, PassRefPtr<MediaStream> stream) | 55 MediaStreamEvent::MediaStreamEvent(const AtomicString& type, bool canBubble, boo
l cancelable, PassRefPtr<MediaStream> stream) |
| 56 : Event(type, canBubble, cancelable) | 56 : Event(type, canBubble, cancelable) |
| 57 , m_stream(stream) | 57 , m_stream(stream) |
| (...skipping 28 matching lines...) Expand all Loading... |
| 86 return EventNames::MediaStreamEvent; | 86 return EventNames::MediaStreamEvent; |
| 87 } | 87 } |
| 88 | 88 |
| 89 void MediaStreamEvent::trace(Visitor* visitor) | 89 void MediaStreamEvent::trace(Visitor* visitor) |
| 90 { | 90 { |
| 91 Event::trace(visitor); | 91 Event::trace(visitor); |
| 92 } | 92 } |
| 93 | 93 |
| 94 } // namespace WebCore | 94 } // namespace WebCore |
| 95 | 95 |
| OLD | NEW |