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 #include "config.h" |
| 6 |
| 7 #include "modules/mediarecorder/BlobEvent.h" |
| 8 |
| 9 #include "modules/mediarecorder/BlobEventInit.h" |
| 10 |
| 11 namespace blink { |
| 12 |
| 13 // static |
| 14 PassRefPtrWillBeRawPtr<BlobEvent> BlobEvent::create() |
| 15 { |
| 16 return adoptRefWillBeNoop(new BlobEvent); |
| 17 } |
| 18 |
| 19 // static |
| 20 PassRefPtrWillBeRawPtr<BlobEvent> BlobEvent::create(const AtomicString& type, co
nst BlobEventInit& initializer) |
| 21 { |
| 22 return adoptRefWillBeNoop(new BlobEvent(type, initializer)); |
| 23 } |
| 24 |
| 25 // static |
| 26 PassRefPtrWillBeRawPtr<BlobEvent> BlobEvent::create(const AtomicString& type, Bl
ob* blob) |
| 27 { |
| 28 return adoptRefWillBeNoop(new BlobEvent(type, blob)); |
| 29 } |
| 30 |
| 31 const AtomicString& BlobEvent::interfaceName() const |
| 32 { |
| 33 return EventNames::BlobEvent; |
| 34 } |
| 35 |
| 36 DEFINE_TRACE(BlobEvent) |
| 37 { |
| 38 visitor->trace(m_blob); |
| 39 Event::trace(visitor); |
| 40 } |
| 41 |
| 42 BlobEvent::BlobEvent(const AtomicString& type, const BlobEventInit& initializer) |
| 43 : Event(type, initializer) |
| 44 { |
| 45 if (initializer.hasBlob()) |
| 46 m_blob = initializer.blob(); |
| 47 } |
| 48 |
| 49 BlobEvent::BlobEvent(const AtomicString& type, Blob* blob) |
| 50 : Event(type, false /* canBubble */, false /* cancelable */) |
| 51 , m_blob(blob) |
| 52 { |
| 53 } |
| 54 |
| 55 } // namespace blink |
OLD | NEW |