| OLD | NEW |
| (Empty) |
| 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 | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #include "sky/engine/config.h" | |
| 6 #include "sky/engine/core/animation/AnimationTestHelper.h" | |
| 7 | |
| 8 #include "sky/engine/bindings/core/v8/V8Binding.h" | |
| 9 | |
| 10 namespace blink { | |
| 11 | |
| 12 v8::Handle<v8::Value> stringToV8Value(String string) | |
| 13 { | |
| 14 return v8::Handle<v8::Value>::Cast(v8String(v8::Isolate::GetCurrent(), strin
g)); | |
| 15 } | |
| 16 | |
| 17 v8::Handle<v8::Value> doubleToV8Value(double number) | |
| 18 { | |
| 19 return v8::Handle<v8::Value>::Cast(v8::Number::New(v8::Isolate::GetCurrent()
, number)); | |
| 20 } | |
| 21 | |
| 22 void setV8ObjectPropertyAsString(v8::Handle<v8::Object> object, String name, Str
ing value) | |
| 23 { | |
| 24 object->Set(stringToV8Value(name), stringToV8Value(value)); | |
| 25 } | |
| 26 | |
| 27 void setV8ObjectPropertyAsNumber(v8::Handle<v8::Object> object, String name, dou
ble value) | |
| 28 { | |
| 29 object->Set(stringToV8Value(name), doubleToV8Value(value)); | |
| 30 } | |
| 31 | |
| 32 } // namespace blink | |
| OLD | NEW |