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

Unified Diff: sky/engine/core/script/dom_dart_state.cc

Issue 1161273004: Add a Color class to dart:sky. (Closed) Base URL: git@github.com:/domokit/mojo.git@master
Patch Set: Created 5 years, 7 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 side-by-side diff with in-line comments
Download patch
Index: sky/engine/core/script/dom_dart_state.cc
diff --git a/sky/engine/core/script/dom_dart_state.cc b/sky/engine/core/script/dom_dart_state.cc
index 121bde044154f4a0c120b489870fd0bc554ca78c..86bebaf806e79f7450980b4679bcca6178928570 100644
--- a/sky/engine/core/script/dom_dart_state.cc
+++ b/sky/engine/core/script/dom_dart_state.cc
@@ -7,6 +7,7 @@
#include "sky/engine/core/dom/Document.h"
#include "sky/engine/core/script/dart_loader.h"
+#include "sky/engine/tonic/dart_builtin.h"
namespace blink {
@@ -22,6 +23,9 @@ void DOMDartState::DidSetIsolate() {
x_handle_.Set(this, Dart_NewStringFromCString("x"));
y_handle_.Set(this, Dart_NewStringFromCString("y"));
value_handle_.Set(this, Dart_NewStringFromCString("_value"));
+
+ Dart_Handle sky_library = DartBuiltin::LookupLibrary("dart:sky");
+ color_class_.Set(this, Dart_GetType(sky_library, ToDart("Color"), 0, 0));
}
DOMDartState* DOMDartState::Current() {

Powered by Google App Engine
This is Rietveld 408576698