| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "bindings/modules/v8/WebGLAny.h" | 5 #include "bindings/modules/v8/WebGLAny.h" |
| 6 | 6 |
| 7 #include "bindings/core/v8/ToV8.h" | 7 #include "bindings/core/v8/ToV8.h" |
| 8 #include "wtf/text/WTFString.h" | 8 #include "platform/wtf/text/WTFString.h" |
| 9 | 9 |
| 10 namespace blink { | 10 namespace blink { |
| 11 | 11 |
| 12 ScriptValue WebGLAny(ScriptState* scriptState, bool value) { | 12 ScriptValue WebGLAny(ScriptState* scriptState, bool value) { |
| 13 return ScriptValue(scriptState, v8Boolean(value, scriptState->isolate())); | 13 return ScriptValue(scriptState, v8Boolean(value, scriptState->isolate())); |
| 14 } | 14 } |
| 15 | 15 |
| 16 ScriptValue WebGLAny(ScriptState* scriptState, const bool* value, size_t size) { | 16 ScriptValue WebGLAny(ScriptState* scriptState, const bool* value, size_t size) { |
| 17 v8::Local<v8::Array> array = v8::Array::New(scriptState->isolate(), size); | 17 v8::Local<v8::Array> array = v8::Array::New(scriptState->isolate(), size); |
| 18 for (size_t i = 0; i < size; ++i) { | 18 for (size_t i = 0; i < size; ++i) { |
| (...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 109 return ScriptValue(scriptState, ToV8(value, scriptState->context()->Global(), | 109 return ScriptValue(scriptState, ToV8(value, scriptState->context()->Global(), |
| 110 scriptState->isolate())); | 110 scriptState->isolate())); |
| 111 } | 111 } |
| 112 | 112 |
| 113 ScriptValue WebGLAny(ScriptState* scriptState, DOMUint32Array* value) { | 113 ScriptValue WebGLAny(ScriptState* scriptState, DOMUint32Array* value) { |
| 114 return ScriptValue(scriptState, ToV8(value, scriptState->context()->Global(), | 114 return ScriptValue(scriptState, ToV8(value, scriptState->context()->Global(), |
| 115 scriptState->isolate())); | 115 scriptState->isolate())); |
| 116 } | 116 } |
| 117 | 117 |
| 118 } // namespace blink | 118 } // namespace blink |
| OLD | NEW |