| Index: mojo/public/cpp/bindings/interface_ptr_info.h
|
| diff --git a/mojo/public/cpp/bindings/interface_ptr_info.h b/mojo/public/cpp/bindings/interface_ptr_info.h
|
| index 0b2d8089c4327f7bf608c152980d882dc0626a6b..d1b42df56ce105451e757d9a5ad0905919e41319 100644
|
| --- a/mojo/public/cpp/bindings/interface_ptr_info.h
|
| +++ b/mojo/public/cpp/bindings/interface_ptr_info.h
|
| @@ -15,30 +15,17 @@ namespace mojo {
|
|
|
| // InterfacePtrInfo stores necessary information to communicate with a remote
|
| // interface implementation, which could be used to construct an InterfacePtr.
|
| -template <typename Interface>
|
| -class InterfacePtrInfo {
|
| +class InterfacePtrInfoBase {
|
| public:
|
| - InterfacePtrInfo() : version_(0u) {}
|
| -
|
| - InterfacePtrInfo(ScopedMessagePipeHandle handle, uint32_t version)
|
| - : handle_(std::move(handle)), version_(version) {}
|
| + InterfacePtrInfoBase();
|
|
|
| - InterfacePtrInfo(InterfacePtrInfo&& other)
|
| - : handle_(std::move(other.handle_)), version_(other.version_) {
|
| - other.version_ = 0u;
|
| - }
|
| + InterfacePtrInfoBase(ScopedMessagePipeHandle handle, uint32_t version);
|
|
|
| - ~InterfacePtrInfo() {}
|
| + InterfacePtrInfoBase(InterfacePtrInfoBase&& other);
|
|
|
| - InterfacePtrInfo& operator=(InterfacePtrInfo&& other) {
|
| - if (this != &other) {
|
| - handle_ = std::move(other.handle_);
|
| - version_ = other.version_;
|
| - other.version_ = 0u;
|
| - }
|
| + ~InterfacePtrInfoBase();
|
|
|
| - return *this;
|
| - }
|
| + InterfacePtrInfoBase& operator=(InterfacePtrInfoBase&& other);
|
|
|
| bool is_valid() const { return handle_.is_valid(); }
|
|
|
| @@ -55,7 +42,12 @@ class InterfacePtrInfo {
|
| ScopedMessagePipeHandle handle_;
|
| uint32_t version_;
|
|
|
| - DISALLOW_COPY_AND_ASSIGN(InterfacePtrInfo);
|
| + DISALLOW_COPY_AND_ASSIGN(InterfacePtrInfoBase);
|
| +};
|
| +
|
| +template <typename Interface>
|
| +class InterfacePtrInfo : public InterfacePtrInfoBase {
|
| + using InterfacePtrInfoBase::InterfacePtrInfoBase;
|
| };
|
|
|
| } // namespace mojo
|
|
|