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

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: BlobEvent in global-interface-listing-expected.txt, and rebase 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
« no previous file with comments | « Source/modules/mediarecorder/BlobEvent.h ('k') | Source/modules/mediarecorder/BlobEvent.idl » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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
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
OLDNEW
« no previous file with comments | « Source/modules/mediarecorder/BlobEvent.h ('k') | Source/modules/mediarecorder/BlobEvent.idl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698