| OLD | NEW |
| 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 | 6 |
| 7 #include "modules/mediarecorder/BlobEvent.h" | 7 #include "modules/mediarecorder/BlobEvent.h" |
| 8 | 8 |
| 9 #include "modules/mediarecorder/BlobEventInit.h" | 9 #include "modules/mediarecorder/BlobEventInit.h" |
| 10 | 10 |
| (...skipping 23 matching lines...) Expand all Loading... |
| 34 } | 34 } |
| 35 | 35 |
| 36 DEFINE_TRACE(BlobEvent) | 36 DEFINE_TRACE(BlobEvent) |
| 37 { | 37 { |
| 38 visitor->trace(m_blob); | 38 visitor->trace(m_blob); |
| 39 Event::trace(visitor); | 39 Event::trace(visitor); |
| 40 } | 40 } |
| 41 | 41 |
| 42 BlobEvent::BlobEvent(const AtomicString& type, const BlobEventInit& initializer) | 42 BlobEvent::BlobEvent(const AtomicString& type, const BlobEventInit& initializer) |
| 43 : Event(type, initializer) | 43 : Event(type, initializer) |
| 44 , m_blob(initializer.data()) |
| 44 { | 45 { |
| 45 if (initializer.hasBlob()) | |
| 46 m_blob = initializer.blob(); | |
| 47 } | 46 } |
| 48 | 47 |
| 49 BlobEvent::BlobEvent(const AtomicString& type, Blob* blob) | 48 BlobEvent::BlobEvent(const AtomicString& type, Blob* blob) |
| 50 : Event(type, false /* canBubble */, false /* cancelable */) | 49 : Event(type, false /* canBubble */, false /* cancelable */) |
| 51 , m_blob(blob) | 50 , m_blob(blob) |
| 52 { | 51 { |
| 53 } | 52 } |
| 54 | 53 |
| 55 } // namespace blink | 54 } // namespace blink |
| OLD | NEW |