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

Unified Diff: mojo/public/tools/bindings/generators/cpp_templates/wrapper_class_declaration.tmpl

Issue 658923003: Remove dependency on ui from view_manager. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: rebase Created 6 years, 2 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: mojo/public/tools/bindings/generators/cpp_templates/wrapper_class_declaration.tmpl
diff --git a/mojo/public/tools/bindings/generators/cpp_templates/wrapper_class_declaration.tmpl b/mojo/public/tools/bindings/generators/cpp_templates/wrapper_class_declaration.tmpl
index f6bea2c5dfb613db5149cc7a21480f13fd02c877..25b39b30d0e5622390e3010e77dd2168224d8a57 100644
--- a/mojo/public/tools/bindings/generators/cpp_templates/wrapper_class_declaration.tmpl
+++ b/mojo/public/tools/bindings/generators/cpp_templates/wrapper_class_declaration.tmpl
@@ -19,6 +19,11 @@ class {{struct.name}} {
return mojo::TypeConverter<{{struct.name}}Ptr, U>::Convert(u);
}
+ template <typename U>
+ U To() const {
+ return mojo::TypeConverter<U, {{struct.name}}>::Convert(*this);
+ }
+
{{struct.name}}();
~{{struct.name}}();

Powered by Google App Engine
This is Rietveld 408576698