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

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

Issue 289063015: Mojo: Remove SetClient from generated interfaces (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 6 years, 7 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
« no previous file with comments | « mojo/public/cpp/bindings/interface_impl.h ('k') | mojo/public/cpp/bindings/lib/interface_impl_internal.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/public/cpp/bindings/interface_ptr.h
diff --git a/mojo/public/cpp/bindings/interface_ptr.h b/mojo/public/cpp/bindings/interface_ptr.h
index 91bd6ba40f50cfd23341eac4369fb13b82b06de5..6d47a8621739c1de1a9b8e1d34e8ee84558db347 100644
--- a/mojo/public/cpp/bindings/interface_ptr.h
+++ b/mojo/public/cpp/bindings/interface_ptr.h
@@ -60,6 +60,11 @@ class InterfacePtr {
internal_state_.ConfigureProxy(handle.Pass(), waiter);
}
+ // The client interface may only be set after this InterfacePtr<..> is bound.
+ void set_client(typename Interface::Client* client) {
+ internal_state_.set_client(client);
+ }
+
// This method may be called to query if the underlying pipe has encountered
// an error. If true, this means method calls made on this interface will be
// dropped (and may have already been dropped) on the floor.
@@ -99,8 +104,8 @@ class InterfacePtr {
// Takes a handle to the proxy end-point of a pipe. On the other end is
// presumed to be an interface implementation of type |Interface|. Returns a
// generated proxy to that interface, which may be used on the current thread.
-// It is valid to call SetClient on the returned Interface to set an instance
-// of Interface::Client.
+// It is valid to call set_client on the returned InterfacePtr<..> to set an
+// instance of Interface::Client.
template <typename Interface>
InterfacePtr<Interface> MakeProxy(
ScopedMessagePipeHandle handle,
« no previous file with comments | « mojo/public/cpp/bindings/interface_impl.h ('k') | mojo/public/cpp/bindings/lib/interface_impl_internal.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698