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

Unified Diff: content/child/mojo/type_converters.h

Issue 1775953004: bluetooth: Move writeValue to mojo (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@my-origin
Patch Set: Moar clean up Created 4 years, 9 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: content/child/mojo/type_converters.h
diff --git a/content/child/mojo/type_converters.h b/content/child/mojo/type_converters.h
index 180cadb6f5476750a44f2564908cadc0a2598df0..1a9a5bb9527a8e43baf1431210f6781a0dfdfa55 100644
--- a/content/child/mojo/type_converters.h
+++ b/content/child/mojo/type_converters.h
@@ -6,6 +6,7 @@
#include <utility>
#include "mojo/public/cpp/bindings/array.h"
+#include "third_party/WebKit/public/platform/WebString.h"
#include "third_party/WebKit/public/platform/WebVector.h"
namespace mojo {
@@ -20,4 +21,11 @@ struct TypeConverter<Array<T>, blink::WebVector<U>> {
}
};
+template <>
+struct TypeConverter<String, blink::WebString> {
Jeffrey Yasskin 2016/03/25 00:48:23 There was something about blink-friendly bindings
ortuno 2016/03/29 17:58:34 No :( We are converting from a WebString to a mojo
Jeffrey Yasskin 2016/03/29 20:30:02 Too bad.
+ static String Convert(const blink::WebString& web_string) {
+ return String(web_string.utf8());
+ }
+};
+
} // namespace mojo

Powered by Google App Engine
This is Rietveld 408576698