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

Side by Side Diff: mojo/public/cpp/bindings/lib/bindings_internal.h

Issue 1751563002: Mojo C++ bindings: support mapping mojo string to WTF::String. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: sync & rebase 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 unified diff | Download patch
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef MOJO_PUBLIC_CPP_BINDINGS_LIB_BINDINGS_INTERNAL_H_ 5 #ifndef MOJO_PUBLIC_CPP_BINDINGS_LIB_BINDINGS_INTERNAL_H_
6 #define MOJO_PUBLIC_CPP_BINDINGS_LIB_BINDINGS_INTERNAL_H_ 6 #define MOJO_PUBLIC_CPP_BINDINGS_LIB_BINDINGS_INTERNAL_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include "mojo/public/cpp/bindings/lib/interface_id.h" 10 #include "mojo/public/cpp/bindings/lib/interface_id.h"
11 #include "mojo/public/cpp/bindings/lib/template_util.h" 11 #include "mojo/public/cpp/bindings/lib/template_util.h"
12 #include "mojo/public/cpp/system/core.h" 12 #include "mojo/public/cpp/system/core.h"
13 13
14 namespace WTF {
15 class String;
16 }
14 namespace mojo { 17 namespace mojo {
15 class String; 18 class String;
16 19
17 template <typename T> 20 template <typename T>
18 class StructPtr; 21 class StructPtr;
19 22
20 template <typename T> 23 template <typename T>
21 class InlinedStructPtr; 24 class InlinedStructPtr;
22 25
23 namespace internal { 26 namespace internal {
(...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after
155 template <typename S> 158 template <typename S>
156 struct WrapperTraits<S, true> { 159 struct WrapperTraits<S, true> {
157 typedef typename S::Data_* DataType; 160 typedef typename S::Data_* DataType;
158 }; 161 };
159 162
160 template <> 163 template <>
161 struct WrapperTraits<String, false> { 164 struct WrapperTraits<String, false> {
162 typedef String_Data* DataType; 165 typedef String_Data* DataType;
163 }; 166 };
164 167
168 template <>
169 struct WrapperTraits<WTF::String, false> {
170 typedef String_Data* DataType;
171 };
172
165 } // namespace internal 173 } // namespace internal
166 } // namespace mojo 174 } // namespace mojo
167 175
168 #endif // MOJO_PUBLIC_CPP_BINDINGS_LIB_BINDINGS_INTERNAL_H_ 176 #endif // MOJO_PUBLIC_CPP_BINDINGS_LIB_BINDINGS_INTERNAL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698