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

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

Issue 1497883002: MediaRecorder: update to spec (1/3) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: peter@s comments: add tests for BlobEvent ctor and reordered MediaRecorder.idl to match spec Created 5 years 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
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
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698