OLD | NEW |
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_COMMON_COMMON_TYPE_CONVERTERS_H_ | 5 #ifndef MOJO_COMMON_COMMON_TYPE_CONVERTERS_H_ |
6 #define MOJO_COMMON_COMMON_TYPE_CONVERTERS_H_ | 6 #define MOJO_COMMON_COMMON_TYPE_CONVERTERS_H_ |
7 | 7 |
8 #include "base/strings/string16.h" | 8 #include "base/strings/string16.h" |
9 #include "base/strings/string_piece.h" | 9 #include "base/strings/string_piece.h" |
10 #include "mojo/common/mojo_common_export.h" | 10 #include "mojo/common/mojo_common_export.h" |
11 #include "third_party/mojo/src/mojo/public/cpp/bindings/array.h" | 11 #include "mojo/public/cpp/bindings/array.h" |
12 #include "third_party/mojo/src/mojo/public/cpp/bindings/string.h" | 12 #include "mojo/public/cpp/bindings/string.h" |
13 #include "third_party/mojo/src/mojo/public/cpp/bindings/type_converter.h" | 13 #include "mojo/public/cpp/bindings/type_converter.h" |
14 | 14 |
15 namespace mojo { | 15 namespace mojo { |
16 | 16 |
17 template <> | 17 template <> |
18 struct MOJO_COMMON_EXPORT TypeConverter<String, base::StringPiece> { | 18 struct MOJO_COMMON_EXPORT TypeConverter<String, base::StringPiece> { |
19 static String Convert(const base::StringPiece& input); | 19 static String Convert(const base::StringPiece& input); |
20 }; | 20 }; |
21 | 21 |
22 template <> | 22 template <> |
23 struct MOJO_COMMON_EXPORT TypeConverter<base::StringPiece, String> { | 23 struct MOJO_COMMON_EXPORT TypeConverter<base::StringPiece, String> { |
(...skipping 20 matching lines...) Expand all Loading... |
44 }; | 44 }; |
45 | 45 |
46 template <> | 46 template <> |
47 struct MOJO_COMMON_EXPORT TypeConverter<Array<uint8_t>, std::string> { | 47 struct MOJO_COMMON_EXPORT TypeConverter<Array<uint8_t>, std::string> { |
48 static Array<uint8_t> Convert(const std::string& input); | 48 static Array<uint8_t> Convert(const std::string& input); |
49 }; | 49 }; |
50 | 50 |
51 } // namespace mojo | 51 } // namespace mojo |
52 | 52 |
53 #endif // MOJO_COMMON_COMMON_TYPE_CONVERTERS_H_ | 53 #endif // MOJO_COMMON_COMMON_TYPE_CONVERTERS_H_ |
OLD | NEW |