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

Unified Diff: mojo/public/cpp/bindings/lib/serialization_util.h

Issue 1968623002: Mojo C++ bindings: expose public <struct>DataView and StringDataView. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@25_totally_new
Patch Set: Created 4 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
« no previous file with comments | « no previous file | mojo/public/cpp/bindings/lib/string_serialization.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/public/cpp/bindings/lib/serialization_util.h
diff --git a/mojo/public/cpp/bindings/lib/serialization_util.h b/mojo/public/cpp/bindings/lib/serialization_util.h
index 56f5e761daffe43fbfc99ce09092a00612206a47..8e926cc5e832803781cf6b8e9a026e4be8ced18f 100644
--- a/mojo/public/cpp/bindings/lib/serialization_util.h
+++ b/mojo/public/cpp/bindings/lib/serialization_util.h
@@ -102,10 +102,12 @@ inline void InterfaceDataToPointer(Interface_Data* input,
input->version));
}
+// TODO(yzshen): Unify StructTraits::Read*() methods and remove
+// HasReadFromDataViewMethod.
template <typename T>
-struct HasReadFromRawDataMethod {
+struct HasReadFromDataViewMethod {
template <typename U>
- static char Test(decltype(U::ReadFromRawData)*);
+ static char Test(decltype(U::ReadFromDataView)*);
template <typename U>
static int Test(...);
static const bool value = sizeof(Test<T>(0)) == sizeof(char);
« no previous file with comments | « no previous file | mojo/public/cpp/bindings/lib/string_serialization.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698