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

Side by Side Diff: tonic/dart_converter_wtf.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_converter.h ('k') | tonic/dart_dependency_catcher.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_WTF_H_ 5 #ifndef SKY_ENGINE_TONIC_DART_CONVERTER_WTF_H_
6 #define SKY_ENGINE_TONIC_DART_CONVERTER_WTF_H_ 6 #define SKY_ENGINE_TONIC_DART_CONVERTER_WTF_H_
7 7
8 #include <string> 8 #include <string>
9 #include "sky/engine/wtf/text/StringUTF8Adaptor.h" 9 #include "sky/engine/wtf/text/StringUTF8Adaptor.h"
10 #include "sky/engine/wtf/text/WTFString.h" 10 #include "sky/engine/wtf/text/WTFString.h"
11 #include "tonic/dart_converter.h" 11 #include "tonic/dart_converter.h"
12 #include "tonic/dart_string.h" 12 #include "tonic/dart_string.h"
13 #include "tonic/dart_string_cache.h" 13 #include "tonic/dart_string_cache.h"
14 #include "tonic/dart_value.h" 14 #include "tonic/dart_value.h"
15 15
16 namespace blink { 16 namespace tonic {
17 17
18 //////////////////////////////////////////////////////////////////////////////// 18 ////////////////////////////////////////////////////////////////////////////////
19 // Strings 19 // Strings
20 20
21 template <> 21 template <>
22 struct DartConverter<String> { 22 struct DartConverter<String> {
23 static Dart_Handle ToDart(DartState* state, const String& val) { 23 static Dart_Handle ToDart(DartState* state, const String& val) {
24 if (val.isEmpty()) 24 if (val.isEmpty())
25 return Dart_EmptyString(); 25 return Dart_EmptyString();
26 return Dart_HandleFromWeakPersistent(state->string_cache().Get(val.impl())); 26 return Dart_HandleFromWeakPersistent(state->string_cache().Get(val.impl()));
(...skipping 175 matching lines...) Expand 10 before | Expand all | Expand 10 after
202 static Dart_Handle ToDart(RefPtr<T> val) { 202 static Dart_Handle ToDart(RefPtr<T> val) {
203 return DartConverter<T*>::ToDart(val.get()); 203 return DartConverter<T*>::ToDart(val.get());
204 } 204 }
205 205
206 static RefPtr<T> FromDart(Dart_Handle handle) { 206 static RefPtr<T> FromDart(Dart_Handle handle) {
207 return DartConverter<T*>::FromDart(handle); 207 return DartConverter<T*>::FromDart(handle);
208 } 208 }
209 }; 209 };
210 210
211 #endif // SKY_ENGINE_TONIC_DART_CONVERTER_WTF_H_ 211 #endif // SKY_ENGINE_TONIC_DART_CONVERTER_WTF_H_
OLDNEW
« no previous file with comments | « tonic/dart_converter.h ('k') | tonic/dart_dependency_catcher.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698