OLD | NEW |
(Empty) | |
| 1 // Copyright 2014 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 #ifndef MediaProvider_h |
| 6 #define MediaProvider_h |
| 7 |
| 8 #include "platform/heap/Handle.h" |
| 9 #include "wtf/Functional.h" |
| 10 |
| 11 namespace blink { |
| 12 |
| 13 class EventTarget; |
| 14 class MediaProvider; |
| 15 class ScriptValue; |
| 16 |
| 17 class MediaProvider : public WillBeGarbageCollectedMixin { |
| 18 public: |
| 19 // Converter must be a static function and is used for converting between a
ScriptValue and a MediaProvider instance. |
| 20 // If the ScriptValue can not be converted to a MediaProvider, the function
must return null. |
| 21 typedef Function<MediaProvider*(const ScriptValue&)> Converter; |
| 22 static MediaProvider* convert(const ScriptValue&); |
| 23 |
| 24 MediaProvider(const String& interfaceName, const Converter&); |
| 25 virtual ~MediaProvider() { } |
| 26 |
| 27 virtual EventTarget* eventTarget() = 0; |
| 28 virtual const String& getObjectUrl() = 0; |
| 29 |
| 30 virtual void trace(Visitor*) { } |
| 31 }; |
| 32 |
| 33 } // namespace blink |
| 34 |
| 35 #endif |
OLD | NEW |