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

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

Issue 2339413004: Allow Mojo structs as map keys (Closed)
Patch Set: Fix merge problem in BUILD.gn file Created 4 years, 3 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 "mojo/public/cpp/bindings/array.h"
9 #include "mojo/public/cpp/bindings/lib/native_struct_data.h" 9 #include "mojo/public/cpp/bindings/lib/native_struct_data.h"
10 #include "mojo/public/cpp/bindings/struct_ptr.h" 10 #include "mojo/public/cpp/bindings/struct_ptr.h"
(...skipping 20 matching lines...) Expand all
31 template <typename U> 31 template <typename U>
32 U To() const { 32 U To() const {
33 return TypeConverter<U, NativeStruct>::Convert(*this); 33 return TypeConverter<U, NativeStruct>::Convert(*this);
34 } 34 }
35 35
36 NativeStruct(); 36 NativeStruct();
37 ~NativeStruct(); 37 ~NativeStruct();
38 38
39 NativeStructPtr Clone() const; 39 NativeStructPtr Clone() const;
40 bool Equals(const NativeStruct& other) const; 40 bool Equals(const NativeStruct& other) const;
41 size_t Hash(size_t seed) const;
41 42
42 Array<uint8_t> data; 43 Array<uint8_t> data;
43 }; 44 };
44 45
45 } // namespace mojo 46 } // namespace mojo
46 47
47 #endif // MOJO_PUBLIC_CPP_BINDINGS_NATIVE_STRUCT_H_ 48 #endif // MOJO_PUBLIC_CPP_BINDINGS_NATIVE_STRUCT_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698