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

Unified Diff: Source/modules/mediastream/BlobEvent.h

Issue 1255873002: MediaRecorder Blink part (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: peter@ and guidou@ comments Created 5 years, 5 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 side-by-side diff with in-line comments
Download patch
Index: Source/modules/mediastream/BlobEvent.h
diff --git a/Source/modules/mediastream/BlobEvent.h b/Source/modules/mediastream/BlobEvent.h
new file mode 100644
index 0000000000000000000000000000000000000000..b97819797b41e9720fd72f9f46bd8b2cf7aa0397
--- /dev/null
+++ b/Source/modules/mediastream/BlobEvent.h
@@ -0,0 +1,49 @@
+// Copyright 2015 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef BlobEvent_h
+#define BlobEvent_h
+
+#include "core/fileapi/Blob.h"
+#include "modules/EventModules.h"
+#include "modules/ModulesExport.h"
+#include "modules/mediastream/BlobEvent.h"
+#include "wtf/text/AtomicString.h"
+
+namespace blink {
+
+class Blob;
+
+class MODULES_EXPORT BlobEvent final : public Event {
+ DEFINE_WRAPPERTYPEINFO();
+public:
+ virtual ~BlobEvent() {}
+
+ static PassRefPtrWillBeRawPtr<BlobEvent> create() {
+ return adoptRefWillBeNoop(new BlobEvent);
+ }
+
+ static PassRefPtrWillBeRawPtr<BlobEvent> create(const AtomicString& type, bool canBubble, bool cancelable, Blob* blob) {
+ return adoptRefWillBeNoop(new BlobEvent(type, canBubble, cancelable, blob));
+ }
+
+ Blob* data() const { return m_blob.get(); }
tommi (sloooow) - chröme 2015/08/11 08:46:50 can we return const Blob* or make the method non-c
mcasas 2015/08/12 06:47:50 Done.
+
+ // Event
+ virtual const AtomicString& interfaceName() const final { return EventNames::BlobEvent; }
+
+ DECLARE_VIRTUAL_TRACE();
+
+private:
+ BlobEvent() {}
+ BlobEvent(const AtomicString& type, bool canBubble, bool cancelable, Blob* blob)
+ : Event(type, canBubble, cancelable)
+ , m_blob(blob) { }
+
+ PersistentWillBeMember<Blob> m_blob;
+};
+
+} // namespace blink
+
+#endif // BlobEvent_h

Powered by Google App Engine
This is Rietveld 408576698