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 #include "config.h" | |
6 #include "bindings/core/v8/V8HTMLMediaElement.h" | |
7 | |
8 #include "bindings/core/v8/ScriptState.h" | |
9 #include "bindings/core/v8/ScriptValue.h" | |
10 #include "core/html/MediaProvider.h" | |
11 | |
12 namespace blink { | |
13 | |
14 static v8::Handle<v8::Value> toV8Object(MediaProvider* provider, v8::Handle<v8:: Object> creationContext, v8::Isolate* isolate) | |
15 { | |
16 if (provider && provider->eventTarget()) | |
17 return toV8(provider->eventTarget(), creationContext, isolate); | |
18 | |
19 return v8Undefined(); | |
20 } | |
21 | |
22 void blink::V8HTMLMediaElement::srcObjectAttributeGetterCustom(const v8::Propert yCallbackInfo<v8::Value>& info) | |
23 { | |
24 HTMLMediaElement* impl = V8HTMLMediaElement::toImpl(info.Holder()); | |
25 v8SetReturnValue(info, toV8Object(impl->srcObject(), info.Holder(), info.Get Isolate())); | |
26 } | |
27 | |
28 void blink::V8HTMLMediaElement::srcObjectAttributeSetterCustom(v8::Local<v8::Val ue> value, const v8::PropertyCallbackInfo<void>& info) | |
29 { | |
30 HTMLMediaElement* impl = V8HTMLMediaElement::toImpl(info.Holder()); | |
31 ScriptValue scriptValue(ScriptState::current(info.GetIsolate()), value); | |
haraken
2014/09/20 08:52:20
I'm sorry for the back & forth, but I begin to thi
perkj_chrome
2014/09/24 11:39:38
But that would require this to include bindings/mo
| |
32 impl->setSrcObject(MediaProvider::convert(scriptValue)); | |
33 } | |
34 | |
35 } // namespace blink | |
OLD | NEW |