| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2013 Google Inc. All rights reserved. | 2 * Copyright (C) 2013 Google Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
| 6 * met: | 6 * met: |
| 7 * | 7 * |
| 8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
| (...skipping 17 matching lines...) Expand all Loading... |
| 28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
| 29 */ | 29 */ |
| 30 | 30 |
| 31 #include "public/web/WebDOMMediaStreamTrack.h" | 31 #include "public/web/WebDOMMediaStreamTrack.h" |
| 32 | 32 |
| 33 #include "bindings/modules/v8/V8MediaStreamTrack.h" | 33 #include "bindings/modules/v8/V8MediaStreamTrack.h" |
| 34 #include "modules/mediastream/MediaStreamTrack.h" | 34 #include "modules/mediastream/MediaStreamTrack.h" |
| 35 | 35 |
| 36 namespace blink { | 36 namespace blink { |
| 37 | 37 |
| 38 WebDOMMediaStreamTrack::WebDOMMediaStreamTrack(PassRefPtrWillBeRawPtr<MediaStrea
mTrack> track) | 38 WebDOMMediaStreamTrack::WebDOMMediaStreamTrack(RawPtr<MediaStreamTrack> track) |
| 39 : m_private(track) | 39 : m_private(track) |
| 40 { | 40 { |
| 41 } | 41 } |
| 42 | 42 |
| 43 WebDOMMediaStreamTrack WebDOMMediaStreamTrack::fromV8Value(v8::Local<v8::Value>
value) | 43 WebDOMMediaStreamTrack WebDOMMediaStreamTrack::fromV8Value(v8::Local<v8::Value>
value) |
| 44 { | 44 { |
| 45 if (V8MediaStreamTrack::hasInstance(value, v8::Isolate::GetCurrent())) { | 45 if (V8MediaStreamTrack::hasInstance(value, v8::Isolate::GetCurrent())) { |
| 46 v8::Local<v8::Object> object = v8::Local<v8::Object>::Cast(value); | 46 v8::Local<v8::Object> object = v8::Local<v8::Object>::Cast(value); |
| 47 return WebDOMMediaStreamTrack(V8MediaStreamTrack::toImpl(object)); | 47 return WebDOMMediaStreamTrack(V8MediaStreamTrack::toImpl(object)); |
| 48 } | 48 } |
| 49 return WebDOMMediaStreamTrack(nullptr); | 49 return WebDOMMediaStreamTrack(nullptr); |
| 50 } | 50 } |
| 51 | 51 |
| 52 void WebDOMMediaStreamTrack::reset() | 52 void WebDOMMediaStreamTrack::reset() |
| 53 { | 53 { |
| 54 m_private.reset(); | 54 m_private.reset(); |
| 55 } | 55 } |
| 56 | 56 |
| 57 void WebDOMMediaStreamTrack::assign(const WebDOMMediaStreamTrack& b) | 57 void WebDOMMediaStreamTrack::assign(const WebDOMMediaStreamTrack& b) |
| 58 { | 58 { |
| 59 m_private = b.m_private; | 59 m_private = b.m_private; |
| 60 } | 60 } |
| 61 | 61 |
| 62 WebMediaStreamTrack WebDOMMediaStreamTrack::component() const | 62 WebMediaStreamTrack WebDOMMediaStreamTrack::component() const |
| 63 { | 63 { |
| 64 return WebMediaStreamTrack(m_private->component()); | 64 return WebMediaStreamTrack(m_private->component()); |
| 65 } | 65 } |
| 66 | 66 |
| 67 } // namespace blink | 67 } // namespace blink |
| OLD | NEW |