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

Unified Diff: mojo/public/cpp/bindings/interface_handle.h

Issue 1660403003: Mojo C++ bindings: Rename InterfaceInfoPtr -> InterfaceHandle (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: using {{InterfaceName}}Handle = InterfaceHandle<{{InterfaceName}}> Created 4 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 side-by-side diff with in-line comments
Download patch
Index: mojo/public/cpp/bindings/interface_handle.h
diff --git a/mojo/public/cpp/bindings/interface_ptr_info.h b/mojo/public/cpp/bindings/interface_handle.h
similarity index 77%
rename from mojo/public/cpp/bindings/interface_ptr_info.h
rename to mojo/public/cpp/bindings/interface_handle.h
index 28fc96ae0238f2325701e12c13184effcd9a3b63..e03fad5203b4b37ff27b9e9c906090142675a833 100644
--- a/mojo/public/cpp/bindings/interface_ptr_info.h
+++ b/mojo/public/cpp/bindings/interface_handle.h
@@ -10,24 +10,24 @@
namespace mojo {
-// InterfacePtrInfo stores necessary information to communicate with a remote
+// InterfaceHandle stores necessary information to communicate with a remote
// interface implementation, which could be used to construct an InterfacePtr.
template <typename Interface>
-class InterfacePtrInfo {
+class InterfaceHandle {
public:
- InterfacePtrInfo() : version_(0u) {}
+ InterfaceHandle() : version_(0u) {}
- InterfacePtrInfo(ScopedMessagePipeHandle handle, uint32_t version)
+ InterfaceHandle(ScopedMessagePipeHandle handle, uint32_t version)
: handle_(handle.Pass()), version_(version) {}
- InterfacePtrInfo(InterfacePtrInfo&& other)
+ InterfaceHandle(InterfaceHandle&& other)
: handle_(other.handle_.Pass()), version_(other.version_) {
other.version_ = 0u;
}
- ~InterfacePtrInfo() {}
+ ~InterfaceHandle() {}
- InterfacePtrInfo& operator=(InterfacePtrInfo&& other) {
+ InterfaceHandle& operator=(InterfaceHandle&& other) {
if (this != &other) {
handle_ = other.handle_.Pass();
version_ = other.version_;
@@ -50,7 +50,7 @@ class InterfacePtrInfo {
ScopedMessagePipeHandle handle_;
uint32_t version_;
- MOJO_MOVE_ONLY_TYPE(InterfacePtrInfo);
+ MOJO_MOVE_ONLY_TYPE(InterfaceHandle);
};
} // namespace mojo

Powered by Google App Engine
This is Rietveld 408576698