Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(79)

Side by Side Diff: third_party/WebKit/Source/bindings/modules/v8/WebGLAny.cpp

Issue 2701993002: DO NOT COMMIT: Results of running new (proposed) clang-format on Blink (Closed)
Patch Set: Created 3 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 "wtf/text/WTFString.h"
9 9
10 namespace blink { 10 namespace blink {
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
59 } 59 }
60 return ScriptValue(scriptState, array); 60 return ScriptValue(scriptState, array);
61 } 61 }
62 62
63 ScriptValue WebGLAny(ScriptState* scriptState, int value) { 63 ScriptValue WebGLAny(ScriptState* scriptState, int value) {
64 return ScriptValue(scriptState, 64 return ScriptValue(scriptState,
65 v8::Integer::New(scriptState->isolate(), value)); 65 v8::Integer::New(scriptState->isolate(), value));
66 } 66 }
67 67
68 ScriptValue WebGLAny(ScriptState* scriptState, unsigned value) { 68 ScriptValue WebGLAny(ScriptState* scriptState, unsigned value) {
69 return ScriptValue( 69 return ScriptValue(scriptState,
70 scriptState, v8::Integer::NewFromUnsigned(scriptState->isolate(), 70 v8::Integer::NewFromUnsigned(
71 static_cast<unsigned>(value))); 71 scriptState->isolate(), static_cast<unsigned>(value)));
72 } 72 }
73 73
74 ScriptValue WebGLAny(ScriptState* scriptState, int64_t value) { 74 ScriptValue WebGLAny(ScriptState* scriptState, int64_t value) {
75 return ScriptValue(scriptState, v8::Number::New(scriptState->isolate(), 75 return ScriptValue(
76 static_cast<double>(value))); 76 scriptState,
77 v8::Number::New(scriptState->isolate(), static_cast<double>(value)));
77 } 78 }
78 79
79 ScriptValue WebGLAny(ScriptState* scriptState, uint64_t value) { 80 ScriptValue WebGLAny(ScriptState* scriptState, uint64_t value) {
80 return ScriptValue(scriptState, v8::Number::New(scriptState->isolate(), 81 return ScriptValue(
81 static_cast<double>(value))); 82 scriptState,
83 v8::Number::New(scriptState->isolate(), static_cast<double>(value)));
82 } 84 }
83 85
84 ScriptValue WebGLAny(ScriptState* scriptState, float value) { 86 ScriptValue WebGLAny(ScriptState* scriptState, float value) {
85 return ScriptValue(scriptState, 87 return ScriptValue(scriptState,
86 v8::Number::New(scriptState->isolate(), value)); 88 v8::Number::New(scriptState->isolate(), value));
87 } 89 }
88 90
89 ScriptValue WebGLAny(ScriptState* scriptState, String value) { 91 ScriptValue WebGLAny(ScriptState* scriptState, String value) {
90 return ScriptValue(scriptState, v8String(scriptState->isolate(), value)); 92 return ScriptValue(scriptState, v8String(scriptState->isolate(), value));
91 } 93 }
92 94
93 ScriptValue WebGLAny(ScriptState* scriptState, WebGLObject* value) { 95 ScriptValue WebGLAny(ScriptState* scriptState, WebGLObject* value) {
94 return ScriptValue(scriptState, ToV8(value, scriptState->context()->Global(), 96 return ScriptValue(
95 scriptState->isolate())); 97 scriptState,
98 ToV8(value, scriptState->context()->Global(), scriptState->isolate()));
96 } 99 }
97 100
98 ScriptValue WebGLAny(ScriptState* scriptState, DOMFloat32Array* value) { 101 ScriptValue WebGLAny(ScriptState* scriptState, DOMFloat32Array* value) {
99 return ScriptValue(scriptState, ToV8(value, scriptState->context()->Global(), 102 return ScriptValue(
100 scriptState->isolate())); 103 scriptState,
104 ToV8(value, scriptState->context()->Global(), scriptState->isolate()));
101 } 105 }
102 106
103 ScriptValue WebGLAny(ScriptState* scriptState, DOMInt32Array* value) { 107 ScriptValue WebGLAny(ScriptState* scriptState, DOMInt32Array* value) {
104 return ScriptValue(scriptState, ToV8(value, scriptState->context()->Global(), 108 return ScriptValue(
105 scriptState->isolate())); 109 scriptState,
110 ToV8(value, scriptState->context()->Global(), scriptState->isolate()));
106 } 111 }
107 112
108 ScriptValue WebGLAny(ScriptState* scriptState, DOMUint8Array* value) { 113 ScriptValue WebGLAny(ScriptState* scriptState, DOMUint8Array* value) {
109 return ScriptValue(scriptState, ToV8(value, scriptState->context()->Global(), 114 return ScriptValue(
110 scriptState->isolate())); 115 scriptState,
116 ToV8(value, scriptState->context()->Global(), scriptState->isolate()));
111 } 117 }
112 118
113 ScriptValue WebGLAny(ScriptState* scriptState, DOMUint32Array* value) { 119 ScriptValue WebGLAny(ScriptState* scriptState, DOMUint32Array* value) {
114 return ScriptValue(scriptState, ToV8(value, scriptState->context()->Global(), 120 return ScriptValue(
115 scriptState->isolate())); 121 scriptState,
122 ToV8(value, scriptState->context()->Global(), scriptState->isolate()));
116 } 123 }
117 124
118 } // namespace blink 125 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698