| Index: mojo/shell/public/cpp/application_connection.h
|
| diff --git a/mojo/shell/public/cpp/application_connection.h b/mojo/shell/public/cpp/application_connection.h
|
| index 64d613d074e34158cbd91ab535c730357a571cba..9fbf073fc1421361a40685ef9b15ad56cf0a62ec 100644
|
| --- a/mojo/shell/public/cpp/application_connection.h
|
| +++ b/mojo/shell/public/cpp/application_connection.h
|
| @@ -119,16 +119,25 @@ class ApplicationConnection {
|
| virtual void SetRemoteServiceProviderConnectionErrorHandler(
|
| const Closure& handler) = 0;
|
|
|
| + // Returns the id of the remote application. For ApplicationConnections
|
| + // created via ApplicationImpl::ConnectToApplication(), this will not be
|
| + // determined until ConnectToApplication()'s callback is run, and this
|
| + // function will return false. Use AddRemoteIDCallback() to schedule a
|
| + // callback to be run when the remote application id is available. A value of
|
| + // Shell::kInvalidApplicationID indicates no remote application connection
|
| + // has been established.
|
| + virtual bool GetRemoteApplicationID(uint32_t* remote_id) const = 0;
|
| +
|
| // Returns the id of the deepest content handler used in connecting to
|
| - // the application. If the content handler id has not yet been determined
|
| - // this returns false, use AddContentHandlerIDCallback() to schedule a
|
| - // callback when the content handler is has been obtained. A value of 0
|
| + // the application. See GetRemoteApplicationID() for details about the return
|
| + // value. A |content_handler_id| value of Shell::kInvalidApplicationID
|
| // indicates no content handler was used in connecting to the application.
|
| - virtual bool GetContentHandlerID(uint32_t* content_handler_id) = 0;
|
| + virtual bool GetRemoteContentHandlerID(
|
| + uint32_t* content_handler_id) const = 0;
|
|
|
| - // See description in GetTargetID(). If the id of the content handler has
|
| - // been obtained |callback| is run immediately.
|
| - virtual void AddContentHandlerIDCallback(const Closure& callback) = 0;
|
| + // See description in GetRemoteApplicationID()/GetRemoteContentHandlerID(). If
|
| + // the ids are available, |callback| is run immediately.
|
| + virtual void AddRemoteIDCallback(const Closure& callback) = 0;
|
|
|
| protected:
|
| // Returns true if the connector was set, false if it was not set (e.g. by
|
|
|