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

Unified Diff: Source/core/html/MediaProvider.h

Issue 545933002: Implement HTMLMediaElement::srcObject. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Addressed sofs easy comments. Created 6 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 side-by-side diff with in-line comments
Download patch
Index: Source/core/html/MediaProvider.h
diff --git a/Source/core/html/MediaProvider.h b/Source/core/html/MediaProvider.h
new file mode 100644
index 0000000000000000000000000000000000000000..627f0082f45be86e4006e9aa949fb920989bafd9
--- /dev/null
+++ b/Source/core/html/MediaProvider.h
@@ -0,0 +1,35 @@
+// Copyright 2014 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 MediaProvider_h
+#define MediaProvider_h
+
+#include "platform/heap/Handle.h"
+#include "wtf/Functional.h"
+
+namespace blink {
+
+class EventTarget;
+class MediaProvider;
+class ScriptValue;
+
+class MediaProvider : public WillBeGarbageCollectedMixin {
+public:
+ // Converter must be a static function and is used for converting between a ScriptValue and a MediaProvider instance.
+ // If the ScriptValue can not be converted to a MediaProvider, the function must return null.
+ typedef Function<MediaProvider*(const ScriptValue&)> Converter;
+ static MediaProvider* convert(const ScriptValue&);
+
+ MediaProvider(const String& interfaceName, const Converter&);
+ virtual ~MediaProvider() { }
+
+ virtual EventTarget* eventTarget() = 0;
+ virtual const String& getObjectUrl() = 0;
+
+ virtual void trace(Visitor*) { }
+};
+
+} // namespace blink
+
+#endif

Powered by Google App Engine
This is Rietveld 408576698