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

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

Issue 1501793003: Rename MOVE_ONLY_TYPE_WITH_MOVE_CONSTRUCTOR_FOR_CPP_03 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: move-name: todos Created 5 years 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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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_ASSOCIATED_INTERFACE_PTR_INFO_H_ 5 #ifndef MOJO_PUBLIC_CPP_BINDINGS_ASSOCIATED_INTERFACE_PTR_INFO_H_
6 #define MOJO_PUBLIC_CPP_BINDINGS_ASSOCIATED_INTERFACE_PTR_INFO_H_ 6 #define MOJO_PUBLIC_CPP_BINDINGS_ASSOCIATED_INTERFACE_PTR_INFO_H_
7 7
8 #include "base/macros.h" 8 #include "base/macros.h"
9 #include "mojo/public/cpp/bindings/lib/scoped_interface_endpoint_handle.h" 9 #include "mojo/public/cpp/bindings/lib/scoped_interface_endpoint_handle.h"
10 10
11 namespace mojo { 11 namespace mojo {
12 12
13 namespace internal { 13 namespace internal {
14 class AssociatedInterfacePtrInfoHelper; 14 class AssociatedInterfacePtrInfoHelper;
15 } 15 }
16 16
17 // AssociatedInterfacePtrInfo stores necessary information to construct an 17 // AssociatedInterfacePtrInfo stores necessary information to construct an
18 // associated interface pointer. It is similar to InterfacePtrInfo except that 18 // associated interface pointer. It is similar to InterfacePtrInfo except that
19 // it doesn't own a message pipe handle. 19 // it doesn't own a message pipe handle.
20 template <typename Interface> 20 template <typename Interface>
21 class AssociatedInterfacePtrInfo { 21 class AssociatedInterfacePtrInfo {
22 MOVE_ONLY_TYPE_WITH_MOVE_CONSTRUCTOR_FOR_CPP_03(AssociatedInterfacePtrInfo); 22 DISALLOW_COPY_AND_ASSIGN_WITH_MOVE_FOR_BIND(AssociatedInterfacePtrInfo);
23 23
24 public: 24 public:
25 AssociatedInterfacePtrInfo() : version_(0u) {} 25 AssociatedInterfacePtrInfo() : version_(0u) {}
26 26
27 AssociatedInterfacePtrInfo(AssociatedInterfacePtrInfo&& other) 27 AssociatedInterfacePtrInfo(AssociatedInterfacePtrInfo&& other)
28 : handle_(other.handle_.Pass()), version_(other.version_) { 28 : handle_(other.handle_.Pass()), version_(other.version_) {
29 other.version_ = 0u; 29 other.version_ = 0u;
30 } 30 }
31 31
32 ~AssociatedInterfacePtrInfo() {} 32 ~AssociatedInterfacePtrInfo() {}
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
76 static void SetHandle(AssociatedInterfacePtrInfo<Interface>* info, 76 static void SetHandle(AssociatedInterfacePtrInfo<Interface>* info,
77 ScopedInterfaceEndpointHandle handle) { 77 ScopedInterfaceEndpointHandle handle) {
78 info->handle_ = handle.Pass(); 78 info->handle_ = handle.Pass();
79 } 79 }
80 }; 80 };
81 81
82 } // namespace internal 82 } // namespace internal
83 } // namespace mojo 83 } // namespace mojo
84 84
85 #endif // MOJO_PUBLIC_CPP_BINDINGS_ASSOCIATED_INTERFACE_PTR_INFO_H_ 85 #endif // MOJO_PUBLIC_CPP_BINDINGS_ASSOCIATED_INTERFACE_PTR_INFO_H_
OLDNEW
« no previous file with comments | « mojo/public/cpp/bindings/associated_interface_ptr.h ('k') | mojo/public/cpp/bindings/associated_interface_request.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698