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/V8HTMLAudioElement.h" |
| 9 #include "bindings/core/v8/V8HTMLVideoElement.h" |
| 10 |
| 11 namespace blink { |
| 12 |
| 13 v8::Handle<v8::Object> wrap(HTMLMediaElement* impl, v8::Handle<v8::Object> creat
ionContext, v8::Isolate* isolate) |
| 14 { |
| 15 ASSERT(impl); |
| 16 |
| 17 if (isHTMLAudioElement(impl)) |
| 18 return wrap(toHTMLAudioElement(impl), creationContext, isolate); |
| 19 if (isHTMLVideoElement(impl)) |
| 20 return wrap(toHTMLVideoElement(impl), creationContext, isolate); |
| 21 |
| 22 ASSERT(!DOMDataStore::containsWrapper<V8HTMLMediaElement>(impl, isolate)); |
| 23 return V8HTMLMediaElement::createWrapper(impl, creationContext, isolate); |
| 24 } |
| 25 |
| 26 } // namespace blink |
OLD | NEW |