OLD | NEW |
(Empty) | |
| 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 |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef MOJO_PUBLIC_BINDINGS_JS_V8_STRING_H_ |
| 6 #define MOJO_PUBLIC_BINDINGS_JS_V8_STRING_H_ |
| 7 |
| 8 #include <string> |
| 9 |
| 10 #include "mojo/public/bindings/js/v8_wrapper.h" |
| 11 |
| 12 namespace mojo { |
| 13 namespace js { |
| 14 |
| 15 // TODO(abarth): Currently our Wrapper<std::string> is a very basic "always |
| 16 // copy" implementation. Eventually, we'll want to avoid copies using external |
| 17 // string. |
| 18 |
| 19 template<> |
| 20 struct Wrapper<std::string> { |
| 21 static v8::Handle<v8::String> ToObject(v8::Isolate* isolate, |
| 22 std::string native); |
| 23 static std::string ToNative(v8::Handle<v8::Value> value); |
| 24 }; |
| 25 |
| 26 } // namespace js |
| 27 } // namespace mojo |
| 28 |
| 29 #endif // MOJO_PUBLIC_BINDINGS_JS_V8_STRING_H_ |
OLD | NEW |