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

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

Issue 1691493002: Revise comments on various Shell interfaces. Make some methods private on ShellConnection. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: . Created 4 years, 10 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/public/cpp/app_lifetime_helper.h ('k') | mojo/shell/public/cpp/lib/app_lifetime_helper.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/shell/public/cpp/connection.h
diff --git a/mojo/shell/public/cpp/connection.h b/mojo/shell/public/cpp/connection.h
index 0540b089885c81f1b068bfd0c9718cca379a5fc5..e35c74a61d0602fe3b31a26aef25e47b6a0fe93a 100644
--- a/mojo/shell/public/cpp/connection.h
+++ b/mojo/shell/public/cpp/connection.h
@@ -19,8 +19,8 @@ namespace mojo {
class InterfaceBinder;
// Represents a connection to another application. An instance of this class is
-// passed to ShellClient's AcceptConnection() method each
-// time a connection is made to this app.
+// returned from Shell's ConnectToApplication(), and passed to ShellClient's
+// AcceptConnection() each time an incoming connection is received.
//
// To use, define a class that implements your specific interface. Then
// implement an InterfaceFactory<Foo> that binds instances of FooImpl to
@@ -36,14 +36,15 @@ class InterfaceBinder;
//
// The InterfaceFactory must outlive the Connection.
//
-// Additionally you specify a InterfaceBinder. If a InterfaceBinder has
-// been set and an InterfaceFactory has not been registered for the interface
-// request, than the interface request is sent to the InterfaceBinder.
+// Additionally you may specify a default InterfaceBinder to handle requests for
+// interfaces unhandled by any registered InterfaceFactory. Just as with
+// InterfaceFactory, the default InterfaceBinder supplied must outlive
+// Connection.
//
-// Just as with InterfaceFactory, InterfaceBinder must outlive Connection.
-//
-// An Connection's lifetime is managed by an ShellConnection. To close a
-// connection, call CloseConnection which will destroy this object.
+// A Connection returned via Shell::ConnectToApplication() is owned by the
+// caller.
+// An Connection received via AcceptConnection is owned by the ShellConnection.
+// To close a connection, call CloseConnection which will destroy this object.
class Connection {
public:
virtual ~Connection() {}
« no previous file with comments | « mojo/shell/public/cpp/app_lifetime_helper.h ('k') | mojo/shell/public/cpp/lib/app_lifetime_helper.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698