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

Unified Diff: mojo/shell/public/cpp/application_connection.h

Issue 1578473002: Pass application ids via AcceptConnection & ConnectToApplication callback. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: . 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
« no previous file with comments | « mojo/shell/package_manager/package_manager_impl.cc ('k') | mojo/shell/public/cpp/application_impl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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
« no previous file with comments | « mojo/shell/package_manager/package_manager_impl.cc ('k') | mojo/shell/public/cpp/application_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698