Index: Source/bindings/core/v8/custom/V8HTMLMediaElementCustom.cpp |
diff --git a/Source/modules/serviceworkers/InstallPhaseEvent.h b/Source/bindings/core/v8/custom/V8HTMLMediaElementCustom.cpp |
similarity index 61% |
copy from Source/modules/serviceworkers/InstallPhaseEvent.h |
copy to Source/bindings/core/v8/custom/V8HTMLMediaElementCustom.cpp |
index 702e7b2a6a33edf621f275ac492ef9ba4ed5a344..80b5d8d891c5e8661116ae31da053509b19f2207 100644 |
--- a/Source/modules/serviceworkers/InstallPhaseEvent.h |
+++ b/Source/bindings/core/v8/custom/V8HTMLMediaElementCustom.cpp |
@@ -28,36 +28,35 @@ |
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
*/ |
-#ifndef InstallPhaseEvent_h |
-#define InstallPhaseEvent_h |
+#include "config.h" |
+#include "bindings/core/v8/V8HTMLMediaElement.h" |
+#include "bindings/core/v8/ScriptState.h" |
#include "bindings/core/v8/ScriptValue.h" |
-#include "modules/EventModules.h" |
+#include "core/html/MediaProvider.h" |
namespace blink { |
-class WaitUntilObserver; |
+static v8::Handle<v8::Value> toV8Object(MediaProvider* provider, v8::Handle<v8::Object> creationContext, v8::Isolate* isolate) |
+{ |
+ if (provider && provider->eventTarget()) |
+ return toV8(provider->eventTarget(), creationContext, isolate); |
-class InstallPhaseEvent : public Event { |
- DEFINE_WRAPPERTYPEINFO(); |
-public: |
- static PassRefPtrWillBeRawPtr<InstallPhaseEvent> create(); |
- static PassRefPtrWillBeRawPtr<InstallPhaseEvent> create(const AtomicString& type, const EventInit&, WaitUntilObserver*); |
+ return v8Undefined(); |
+} |
- virtual ~InstallPhaseEvent(); |
+void blink::V8HTMLMediaElement::srcObjectAttributeGetterCustom(const v8::PropertyCallbackInfo<v8::Value>& info) |
+{ |
+ HTMLMediaElement* impl = V8HTMLMediaElement::toNative(info.Holder()); |
+ v8SetReturnValue(info, toV8Object(impl->srcObject(), info.Holder(), info.GetIsolate())); |
+} |
- void waitUntil(ScriptState*, const ScriptValue&); |
- |
- virtual const AtomicString& interfaceName() const OVERRIDE; |
- virtual void trace(Visitor*) OVERRIDE; |
- |
-protected: |
- InstallPhaseEvent(); |
- InstallPhaseEvent(const AtomicString& type, const EventInit&, WaitUntilObserver*); |
- |
- PersistentWillBeMember<WaitUntilObserver> m_observer; |
-}; |
+void blink::V8HTMLMediaElement::srcObjectAttributeSetterCustom(v8::Local<v8::Value> value, const v8::PropertyCallbackInfo<void>& info) |
+{ |
+ HTMLMediaElement* impl = V8HTMLMediaElement::toNative(info.Holder()); |
+ ScriptValue scriptValue(ScriptState::current(info.GetIsolate()), value); |
+ impl->setSrcObject(MediaProvider::convert(scriptValue)); |
+} |
} // namespace blink |
-#endif // InstallPhaseEvent_h |