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 309 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
320 v8::Local<v8::Value> v8Value; | 320 v8::Local<v8::Value> v8Value; |
321 if (!getKey(key, v8Value)) | 321 if (!getKey(key, v8Value)) |
322 return false; | 322 return false; |
323 | 323 |
324 value = 0; | 324 value = 0; |
325 if (V8Uint8Array::HasInstance(v8Value, m_isolate, worldType(m_isolate))) | 325 if (V8Uint8Array::HasInstance(v8Value, m_isolate, worldType(m_isolate))) |
326 value = V8Uint8Array::toNative(v8::Handle<v8::Object>::Cast(v8Value)); | 326 value = V8Uint8Array::toNative(v8::Handle<v8::Object>::Cast(v8Value)); |
327 return true; | 327 return true; |
328 } | 328 } |
329 | 329 |
| 330 bool Dictionary::get(const String& key, RefPtr<ArrayBufferView>& value) const |
| 331 { |
| 332 v8::Local<v8::Value> v8Value; |
| 333 if (!getKey(key, v8Value)) |
| 334 return false; |
| 335 |
| 336 value = 0; |
| 337 if (V8ArrayBufferView::HasInstance(v8Value, m_isolate, worldType(m_isolate))
) |
| 338 value = V8ArrayBufferView::toNative(v8::Handle<v8::Object>::Cast(v8Value
)); |
| 339 return true; |
| 340 } |
| 341 |
330 bool Dictionary::get(const String& key, RefPtr<MIDIPort>& value) const | 342 bool Dictionary::get(const String& key, RefPtr<MIDIPort>& value) const |
331 { | 343 { |
332 v8::Local<v8::Value> v8Value; | 344 v8::Local<v8::Value> v8Value; |
333 if (!getKey(key, v8Value)) | 345 if (!getKey(key, v8Value)) |
334 return false; | 346 return false; |
335 | 347 |
336 value = 0; | 348 value = 0; |
337 if (V8MIDIPort::HasInstance(v8Value, m_isolate, worldType(m_isolate))) | 349 if (V8MIDIPort::HasInstance(v8Value, m_isolate, worldType(m_isolate))) |
338 value = V8MIDIPort::toNative(v8::Handle<v8::Object>::Cast(v8Value)); | 350 value = V8MIDIPort::toNative(v8::Handle<v8::Object>::Cast(v8Value)); |
339 return true; | 351 return true; |
(...skipping 242 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
582 v8::Local<v8::String> key = properties->Get(i)->ToString(); | 594 v8::Local<v8::String> key = properties->Get(i)->ToString(); |
583 if (!options->Has(key)) | 595 if (!options->Has(key)) |
584 continue; | 596 continue; |
585 names.append(toWebCoreString(key)); | 597 names.append(toWebCoreString(key)); |
586 } | 598 } |
587 | 599 |
588 return true; | 600 return true; |
589 } | 601 } |
590 | 602 |
591 } // namespace WebCore | 603 } // namespace WebCore |
OLD | NEW |