OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2010 Google Inc. All rights reserved. | 2 * Copyright (C) 2010 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 | 5 * modification, are permitted provided that the following conditions |
6 * are met: | 6 * are met: |
7 * | 7 * |
8 * 1. Redistributions of source code must retain the above copyright | 8 * 1. 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 * 2. Redistributions in binary form must reproduce the above copyright | 10 * 2. Redistributions in binary form must reproduce the above copyright |
(...skipping 211 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
222 const StringView& key, | 222 const StringView& key, |
223 Member<TrackBase>& value) { | 223 Member<TrackBase>& value) { |
224 v8::Local<v8::Value> v8Value; | 224 v8::Local<v8::Value> v8Value; |
225 if (!dictionary.get(key, v8Value)) | 225 if (!dictionary.get(key, v8Value)) |
226 return false; | 226 return false; |
227 | 227 |
228 TrackBase* source = 0; | 228 TrackBase* source = 0; |
229 if (v8Value->IsObject()) { | 229 if (v8Value->IsObject()) { |
230 v8::Local<v8::Object> wrapper = v8::Local<v8::Object>::Cast(v8Value); | 230 v8::Local<v8::Object> wrapper = v8::Local<v8::Object>::Cast(v8Value); |
231 | 231 |
232 // FIXME: this will need to be changed so it can also return an AudioTrack o
r a VideoTrack once | 232 // FIXME: this will need to be changed so it can also return an AudioTrack |
233 // we add them. | 233 // or a VideoTrack once we add them. |
234 v8::Local<v8::Object> track = V8TextTrack::findInstanceInPrototypeChain( | 234 v8::Local<v8::Object> track = V8TextTrack::findInstanceInPrototypeChain( |
235 wrapper, dictionary.isolate()); | 235 wrapper, dictionary.isolate()); |
236 if (!track.IsEmpty()) | 236 if (!track.IsEmpty()) |
237 source = V8TextTrack::toImpl(track); | 237 source = V8TextTrack::toImpl(track); |
238 } | 238 } |
239 value = source; | 239 value = source; |
240 return true; | 240 return true; |
241 } | 241 } |
242 | 242 |
243 template <> | 243 template <> |
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
347 DOMUint8Array*& value) { | 347 DOMUint8Array*& value) { |
348 v8::Local<v8::Value> v8Value; | 348 v8::Local<v8::Value> v8Value; |
349 if (!dictionary.get(key, v8Value)) | 349 if (!dictionary.get(key, v8Value)) |
350 return false; | 350 return false; |
351 | 351 |
352 value = V8Uint8Array::toImplWithTypeCheck(dictionary.isolate(), v8Value); | 352 value = V8Uint8Array::toImplWithTypeCheck(dictionary.isolate(), v8Value); |
353 return true; | 353 return true; |
354 } | 354 } |
355 | 355 |
356 } // namespace blink | 356 } // namespace blink |
OLD | NEW |