| Index: mojo/public/cpp/bindings/struct_ptr.h
|
| diff --git a/mojo/public/cpp/bindings/struct_ptr.h b/mojo/public/cpp/bindings/struct_ptr.h
|
| index ab5d57034559c65dc7de1c6fbac630f88f6d1e46..e3b072deaad2e75fb9306c351536cf145c080375 100644
|
| --- a/mojo/public/cpp/bindings/struct_ptr.h
|
| +++ b/mojo/public/cpp/bindings/struct_ptr.h
|
| @@ -8,7 +8,7 @@
|
| #include <new>
|
|
|
| #include "base/logging.h"
|
| -#include "base/macros.h"
|
| +#include "base/move.h"
|
| #include "mojo/public/cpp/bindings/type_converter.h"
|
|
|
| namespace mojo {
|
| @@ -28,6 +28,8 @@
|
| // Smart pointer wrapping a mojom structure with move-only semantics.
|
| template <typename Struct>
|
| class StructPtr {
|
| + MOVE_ONLY_TYPE_FOR_CPP_03(StructPtr);
|
| +
|
| public:
|
|
|
| StructPtr() : ptr_(nullptr) {}
|
| @@ -84,7 +86,6 @@
|
| }
|
|
|
| private:
|
| - // TODO(dcheng): Use an explicit conversion operator.
|
| typedef Struct* StructPtr::*Testable;
|
|
|
| public:
|
| @@ -111,13 +112,13 @@
|
| }
|
|
|
| Struct* ptr_;
|
| -
|
| - DISALLOW_COPY_AND_ASSIGN(StructPtr);
|
| };
|
|
|
| // Designed to be used when Struct is small and copyable.
|
| template <typename Struct>
|
| class InlinedStructPtr {
|
| + MOVE_ONLY_TYPE_FOR_CPP_03(InlinedStructPtr);
|
| +
|
| public:
|
|
|
| InlinedStructPtr() : is_null_(true) {}
|
| @@ -174,7 +175,6 @@
|
| }
|
|
|
| private:
|
| - // TODO(dcheng): Use an explicit conversion operator.
|
| typedef Struct InlinedStructPtr::*Testable;
|
|
|
| public:
|
| @@ -199,8 +199,6 @@
|
|
|
| mutable Struct value_;
|
| bool is_null_;
|
| -
|
| - DISALLOW_COPY_AND_ASSIGN(InlinedStructPtr);
|
| };
|
|
|
| } // namespace mojo
|
|
|