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

Unified Diff: sky/engine/tonic/dart_converter.h

Issue 918333002: Add the c++ code part of bindings2/ (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Updated per earlier reviews 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « sky/engine/tonic/dart_builtin.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sky/engine/tonic/dart_converter.h
diff --git a/sky/engine/tonic/dart_converter.h b/sky/engine/tonic/dart_converter.h
index 37b80d635427aa44cc9fbdc66cea2db1f71bcc00..381af62d658ed695dffe2463b097070723c7eac5 100644
--- a/sky/engine/tonic/dart_converter.h
+++ b/sky/engine/tonic/dart_converter.h
@@ -320,6 +320,12 @@ inline std::string StdStringFromDart(Dart_Handle handle) {
return std::string(utf8.data(), utf8.length());
}
+
+// Alias Dart_NewStringFromCString for less typing.
+inline Dart_Handle ToDart(const char* val) {
+ return Dart_NewStringFromCString(val);
+}
+
} // namespace blink
#endif // SKY_ENGINE_TONIC_DART_CONVERTER_H_
« no previous file with comments | « sky/engine/tonic/dart_builtin.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698