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

Side by Side Diff: Source/modules/mediarecorder/BlobEvent.cpp

Issue 1354863002: MediaRecorder: Adding BlobEvent and connecting it in MediaRecorderHandler (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: peter@ comments, added BlobEventInit and LayoutTest Created 5 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
(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
Peter Beverloo 2015/09/22 14:03:42 micro nit: no need for the blank line
mcasas 2015/09/22 16:18:48 Actually, I also had no empty line originally :)
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)
21 {
22 return adoptRefWillBeNoop(new BlobEvent(type));
23 }
24
25 // static
26 PassRefPtrWillBeRawPtr<BlobEvent> BlobEvent::create(const AtomicString& type, co nst BlobEventInit& initializer)
27 {
28 return adoptRefWillBeNoop(new BlobEvent(type, initializer));
29 }
30
31 // static
32 PassRefPtrWillBeRawPtr<BlobEvent> BlobEvent::create(const AtomicString& type, bo ol canBubble, bool cancelable, Blob* blob)
33 {
34 return adoptRefWillBeNoop(new BlobEvent(type, canBubble, cancelable, blob));
35 }
36
37 const AtomicString& BlobEvent::interfaceName() const
38 {
39 return EventNames::BlobEvent;
40 }
41
42 DEFINE_TRACE(BlobEvent)
43 {
44 visitor->trace(m_blob);
45 Event::trace(visitor);
46 }
47
48 BlobEvent::BlobEvent(const AtomicString& type)
49 : Event(type, false /* canBubble */, false /* cancelable */)
50 {
51 }
52
53 BlobEvent::BlobEvent(const AtomicString& type, const BlobEventInit& initializer)
54 : Event(type, initializer)
55 {
56 if (initializer.hasBlob())
57 m_blob = initializer.blob();
58 }
59
60 BlobEvent::BlobEvent(const AtomicString& type, bool canBubble, bool cancelable, Blob* blob)
61 : Event(type, canBubble, cancelable)
62 , m_blob(blob)
63 {
64 }
65
66 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698