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

Side by Side Diff: mojo/common/common_type_converters.h

Issue 2234443002: Mojo C++ binding: make device/usb mojom targets use STD string/vector types (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Move the vector converter into a private header. Created 4 years, 4 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_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 <stdint.h> 8 #include <stdint.h>
9 #include <vector>
9 10
10 #include "base/strings/string16.h" 11 #include "base/strings/string16.h"
11 #include "base/strings/string_piece.h" 12 #include "base/strings/string_piece.h"
12 #include "mojo/common/mojo_common_export.h" 13 #include "mojo/common/mojo_common_export.h"
13 #include "mojo/public/cpp/bindings/array.h" 14 #include "mojo/public/cpp/bindings/array.h"
14 #include "mojo/public/cpp/bindings/string.h" 15 #include "mojo/public/cpp/bindings/string.h"
15 #include "mojo/public/cpp/bindings/type_converter.h" 16 #include "mojo/public/cpp/bindings/type_converter.h"
16 17
17 namespace mojo { 18 namespace mojo {
18 19
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
57 }; 58 };
58 59
59 template <> 60 template <>
60 struct MOJO_COMMON_EXPORT TypeConverter<Array<uint8_t>, base::string16> { 61 struct MOJO_COMMON_EXPORT TypeConverter<Array<uint8_t>, base::string16> {
61 static Array<uint8_t> Convert(const base::string16& input); 62 static Array<uint8_t> Convert(const base::string16& input);
62 }; 63 };
63 64
64 } // namespace mojo 65 } // namespace mojo
65 66
66 #endif // MOJO_COMMON_COMMON_TYPE_CONVERTERS_H_ 67 #endif // MOJO_COMMON_COMMON_TYPE_CONVERTERS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698