| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2012 Google Inc. All rights reserved. | 2 * Copyright (C) 2012 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 124 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 135 return v8::Handle<v8::Value>(); | 135 return v8::Handle<v8::Value>(); |
| 136 } | 136 } |
| 137 | 137 |
| 138 v8::Handle<v8::Value> V8Converter::toV8IfBrowserNative(DartDOMData* domData, Dar
t_Handle value, Dart_Handle& exception) | 138 v8::Handle<v8::Value> V8Converter::toV8IfBrowserNative(DartDOMData* domData, Dar
t_Handle value, Dart_Handle& exception) |
| 139 { | 139 { |
| 140 if (Dart_IsByteBuffer(value)) { | 140 if (Dart_IsByteBuffer(value)) { |
| 141 Dart_Handle data = Dart_GetDataFromByteBuffer(value); | 141 Dart_Handle data = Dart_GetDataFromByteBuffer(value); |
| 142 return arrayBufferToV8(data, exception); | 142 return arrayBufferToV8(data, exception); |
| 143 } | 143 } |
| 144 if (Dart_IsTypedData(value)) | 144 if (Dart_IsTypedData(value)) |
| 145 return arrayBufferToV8(value, exception); | 145 return arrayBufferViewToV8(value, exception); |
| 146 // TODO(terry): Using JS Interop only arrays are converted. | 146 // TODO(terry): Using JS Interop only arrays are converted. |
| 147 /* | 147 /* |
| 148 if (DartDOMWrapper::subtypeOf(value, DartBlob::dartClassId)) | 148 if (DartDOMWrapper::subtypeOf(value, DartBlob::dartClassId)) |
| 149 return blobToV8(value, exception); | 149 return blobToV8(value, exception); |
| 150 if (DartDOMWrapper::subtypeOf(value, DartImageData::dartClassId)) | 150 if (DartDOMWrapper::subtypeOf(value, DartImageData::dartClassId)) |
| 151 return imageDataToV8(value, exception); | 151 return imageDataToV8(value, exception); |
| 152 if (DartDOMWrapper::subtypeOf(value, DartIDBKeyRange::dartClassId)) | 152 if (DartDOMWrapper::subtypeOf(value, DartIDBKeyRange::dartClassId)) |
| 153 return idbKeyRangeToV8(value, exception); | 153 return idbKeyRangeToV8(value, exception); |
| 154 if (DartDOMWrapper::subtypeOf(value, DartDOMStringList::dartClassId)) | 154 if (DartDOMWrapper::subtypeOf(value, DartDOMStringList::dartClassId)) |
| 155 return domStringListToV8(value, exception); | 155 return domStringListToV8(value, exception); |
| (...skipping 406 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 562 } | 562 } |
| 563 } | 563 } |
| 564 | 564 |
| 565 Dart_Handle V8Converter::arrayBufferViewToDart(v8::Handle<v8::Object> object, Da
rt_Handle& exception) | 565 Dart_Handle V8Converter::arrayBufferViewToDart(v8::Handle<v8::Object> object, Da
rt_Handle& exception) |
| 566 { | 566 { |
| 567 RefPtr<ArrayBufferView> view = V8ArrayBufferView::toImpl(object)->view(); | 567 RefPtr<ArrayBufferView> view = V8ArrayBufferView::toImpl(object)->view(); |
| 568 return DartUtilities::arrayBufferViewToDart(view.get()); | 568 return DartUtilities::arrayBufferViewToDart(view.get()); |
| 569 } | 569 } |
| 570 | 570 |
| 571 } // namespace blink | 571 } // namespace blink |
| OLD | NEW |