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

Side by Side Diff: mojo/public/cpp/bindings/native_struct.h

Issue 2604953003: Remove internal uses of mojo::Array and mojo::WTFArray. (Closed)
Patch Set: rebase Created 3 years, 11 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 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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_PUBLIC_CPP_BINDINGS_NATIVE_STRUCT_H_ 5 #ifndef MOJO_PUBLIC_CPP_BINDINGS_NATIVE_STRUCT_H_
6 #define MOJO_PUBLIC_CPP_BINDINGS_NATIVE_STRUCT_H_ 6 #define MOJO_PUBLIC_CPP_BINDINGS_NATIVE_STRUCT_H_
7 7
8 #include "mojo/public/cpp/bindings/array.h" 8 #include <vector>
9
10 #include "base/optional.h"
9 #include "mojo/public/cpp/bindings/bindings_export.h" 11 #include "mojo/public/cpp/bindings/bindings_export.h"
10 #include "mojo/public/cpp/bindings/lib/native_struct_data.h" 12 #include "mojo/public/cpp/bindings/lib/native_struct_data.h"
11 #include "mojo/public/cpp/bindings/struct_ptr.h" 13 #include "mojo/public/cpp/bindings/struct_ptr.h"
12 #include "mojo/public/cpp/bindings/type_converter.h" 14 #include "mojo/public/cpp/bindings/type_converter.h"
13 15
14 namespace mojo { 16 namespace mojo {
15 17
16 class NativeStruct; 18 class NativeStruct;
17 using NativeStructPtr = StructPtr<NativeStruct>; 19 using NativeStructPtr = StructPtr<NativeStruct>;
18 20
(...skipping 15 matching lines...) Expand all
34 return TypeConverter<U, NativeStruct>::Convert(*this); 36 return TypeConverter<U, NativeStruct>::Convert(*this);
35 } 37 }
36 38
37 NativeStruct(); 39 NativeStruct();
38 ~NativeStruct(); 40 ~NativeStruct();
39 41
40 NativeStructPtr Clone() const; 42 NativeStructPtr Clone() const;
41 bool Equals(const NativeStruct& other) const; 43 bool Equals(const NativeStruct& other) const;
42 size_t Hash(size_t seed) const; 44 size_t Hash(size_t seed) const;
43 45
44 Array<uint8_t> data; 46 base::Optional<std::vector<uint8_t>> data;
45 }; 47 };
46 48
47 } // namespace mojo 49 } // namespace mojo
48 50
49 #endif // MOJO_PUBLIC_CPP_BINDINGS_NATIVE_STRUCT_H_ 51 #endif // MOJO_PUBLIC_CPP_BINDINGS_NATIVE_STRUCT_H_
OLDNEW
« no previous file with comments | « mojo/public/cpp/bindings/lib/serialization.h ('k') | mojo/public/cpp/bindings/tests/struct_traits_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698