Commit a167544f authored by Daniel Cheng's avatar Daniel Cheng Committed by Commit Bot

[mojo] Move NullAssociated{Receiver,Remote} into the correct header.

These are helpers for PendingAssociated{Receiver,Remote}, so they
should be defined in the corresponding header.

Bug: 1074391
Change-Id: If79abeecd90a5f3df5f5698181dccf2295aadabe
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2165707
Commit-Queue: Daniel Cheng <dcheng@chromium.org>
Commit-Queue: Oksana Zhuravlova <oksamyt@chromium.org>
Auto-Submit: Daniel Cheng <dcheng@chromium.org>
Reviewed-by: default avatarOksana Zhuravlova <oksamyt@chromium.org>
Cr-Commit-Position: refs/heads/master@{#762507}
parent 4c1609b7
...@@ -217,16 +217,6 @@ class AssociatedReceiver { ...@@ -217,16 +217,6 @@ class AssociatedReceiver {
DISALLOW_COPY_AND_ASSIGN(AssociatedReceiver); DISALLOW_COPY_AND_ASSIGN(AssociatedReceiver);
}; };
// Constructs an invalid PendingAssociatedReceiver of any arbitrary interface
// type. Useful as short-hand for a default constructed value.
class COMPONENT_EXPORT(MOJO_CPP_BINDINGS) NullAssociatedReceiver {
public:
template <typename Interface>
operator PendingAssociatedReceiver<Interface>() const {
return PendingAssociatedReceiver<Interface>();
}
};
} // namespace mojo } // namespace mojo
#endif // MOJO_PUBLIC_CPP_BINDINGS_ASSOCIATED_RECEIVER_H_ #endif // MOJO_PUBLIC_CPP_BINDINGS_ASSOCIATED_RECEIVER_H_
...@@ -277,16 +277,6 @@ class AssociatedRemote { ...@@ -277,16 +277,6 @@ class AssociatedRemote {
DISALLOW_COPY_AND_ASSIGN(AssociatedRemote); DISALLOW_COPY_AND_ASSIGN(AssociatedRemote);
}; };
// Constructs an invalid PendingAssociatedRemote of any arbitrary interface
// type. Useful as short-hand for a default constructed value.
class COMPONENT_EXPORT(MOJO_CPP_BINDINGS) NullAssociatedRemote {
public:
template <typename Interface>
operator PendingAssociatedRemote<Interface>() const {
return PendingAssociatedRemote<Interface>();
}
};
} // namespace mojo } // namespace mojo
#endif // MOJO_PUBLIC_CPP_BINDINGS_ASSOCIATED_REMOTE_H_ #endif // MOJO_PUBLIC_CPP_BINDINGS_ASSOCIATED_REMOTE_H_
...@@ -91,6 +91,16 @@ class PendingAssociatedReceiver { ...@@ -91,6 +91,16 @@ class PendingAssociatedReceiver {
DISALLOW_COPY_AND_ASSIGN(PendingAssociatedReceiver); DISALLOW_COPY_AND_ASSIGN(PendingAssociatedReceiver);
}; };
// Constructs an invalid PendingAssociatedReceiver of any arbitrary interface
// type. Useful as short-hand for a default constructed value.
class COMPONENT_EXPORT(MOJO_CPP_BINDINGS) NullAssociatedReceiver {
public:
template <typename Interface>
operator PendingAssociatedReceiver<Interface>() const {
return PendingAssociatedReceiver<Interface>();
}
};
} // namespace mojo } // namespace mojo
#endif // MOJO_PUBLIC_CPP_BINDINGS_PENDING_ASSOCIATED_RECEIVER_H_ #endif // MOJO_PUBLIC_CPP_BINDINGS_PENDING_ASSOCIATED_RECEIVER_H_
...@@ -97,6 +97,16 @@ class PendingAssociatedRemote { ...@@ -97,6 +97,16 @@ class PendingAssociatedRemote {
DISALLOW_COPY_AND_ASSIGN(PendingAssociatedRemote); DISALLOW_COPY_AND_ASSIGN(PendingAssociatedRemote);
}; };
// Constructs an invalid PendingAssociatedRemote of any arbitrary interface
// type. Useful as short-hand for a default constructed value.
class COMPONENT_EXPORT(MOJO_CPP_BINDINGS) NullAssociatedRemote {
public:
template <typename Interface>
operator PendingAssociatedRemote<Interface>() const {
return PendingAssociatedRemote<Interface>();
}
};
} // namespace mojo } // namespace mojo
#endif // MOJO_PUBLIC_CPP_BINDINGS_PENDING_ASSOCIATED_REMOTE_H_ #endif // MOJO_PUBLIC_CPP_BINDINGS_PENDING_ASSOCIATED_REMOTE_H_
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment