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

Side by Side Diff: tonic/dart_converter.h

Issue 1242773003: Use the tonic namespace for tonic + resulting build fixes (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 5 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
« no previous file with comments | « tonic/dart_class_provider.cc ('k') | tonic/dart_converter_wtf.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 SKY_ENGINE_TONIC_DART_CONVERTER_H_ 5 #ifndef SKY_ENGINE_TONIC_DART_CONVERTER_H_
6 #define SKY_ENGINE_TONIC_DART_CONVERTER_H_ 6 #define SKY_ENGINE_TONIC_DART_CONVERTER_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "tonic/dart_state.h" 10 #include "tonic/dart_state.h"
11 11
12 namespace blink { 12 namespace tonic {
13 13
14 // DartConvert converts types back and forth from Sky to Dart. The template 14 // DartConvert converts types back and forth from Sky to Dart. The template
15 // parameter |T| determines what kind of type conversion to perform. 15 // parameter |T| determines what kind of type conversion to perform.
16 template <typename T, typename Enable = void> 16 template <typename T, typename Enable = void>
17 struct DartConverter { 17 struct DartConverter {
18 }; 18 };
19 19
20 // This is to work around the fact that typedefs do not create new types. If you 20 // This is to work around the fact that typedefs do not create new types. If you
21 // have a typedef, and want it to use a different converter, specialize this 21 // have a typedef, and want it to use a different converter, specialize this
22 // template and override the types here. 22 // template and override the types here.
(...skipping 168 matching lines...) Expand 10 before | Expand all | Expand 10 after
191 return std::string(reinterpret_cast<const char*>(data), 191 return std::string(reinterpret_cast<const char*>(data),
192 static_cast<size_t>(length)); 192 static_cast<size_t>(length));
193 } 193 }
194 194
195 195
196 // Alias Dart_NewStringFromCString for less typing. 196 // Alias Dart_NewStringFromCString for less typing.
197 inline Dart_Handle ToDart(const char* val) { 197 inline Dart_Handle ToDart(const char* val) {
198 return Dart_NewStringFromCString(val); 198 return Dart_NewStringFromCString(val);
199 } 199 }
200 200
201 } // namespace blink 201 } // namespace tonic
202 202
203 #endif // SKY_ENGINE_TONIC_DART_CONVERTER_H_ 203 #endif // SKY_ENGINE_TONIC_DART_CONVERTER_H_
OLDNEW
« no previous file with comments | « tonic/dart_class_provider.cc ('k') | tonic/dart_converter_wtf.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698