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

Side by Side Diff: sky/engine/core/animation/AnimationTestHelper.cpp

Issue 922893002: Merge the Sky Engine changes from the SkyDart branch (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 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
(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
OLDNEW
« no previous file with comments | « sky/engine/core/animation/AnimationTestHelper.h ('k') | sky/engine/core/animation/AnimationTimeline.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698