OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef MOJO_SHELL_PUBLIC_CPP_CONNECTION_H_ | 5 #ifndef MOJO_SHELL_PUBLIC_CPP_CONNECTION_H_ |
6 #define MOJO_SHELL_PUBLIC_CPP_CONNECTION_H_ | 6 #define MOJO_SHELL_PUBLIC_CPP_CONNECTION_H_ |
7 | 7 |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include <string> | 10 #include <string> |
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
75 // application handles multiple URLs. Note that this is the URL after all | 75 // application handles multiple URLs. Note that this is the URL after all |
76 // URL rewriting and HTTP redirects have been performed. | 76 // URL rewriting and HTTP redirects have been performed. |
77 // | 77 // |
78 // When Connection is representing and outgoing connection, this will be the | 78 // When Connection is representing and outgoing connection, this will be the |
79 // same as the value returned by GetRemoveApplicationURL(). | 79 // same as the value returned by GetRemoveApplicationURL(). |
80 virtual const std::string& GetConnectionURL() = 0; | 80 virtual const std::string& GetConnectionURL() = 0; |
81 | 81 |
82 // Returns the URL identifying the remote application on this connection. | 82 // Returns the URL identifying the remote application on this connection. |
83 virtual const std::string& GetRemoteApplicationURL() = 0; | 83 virtual const std::string& GetRemoteApplicationURL() = 0; |
84 | 84 |
| 85 // Returns the User ID for the remote application. |
| 86 virtual uint32_t GetRemoteUserID() const = 0; |
| 87 |
85 // Register a handler to receive an error notification on the pipe to the | 88 // Register a handler to receive an error notification on the pipe to the |
86 // remote application's InterfaceProvider. | 89 // remote application's InterfaceProvider. |
87 virtual void SetRemoteInterfaceProviderConnectionErrorHandler( | 90 virtual void SetRemoteInterfaceProviderConnectionErrorHandler( |
88 const Closure& handler) = 0; | 91 const Closure& handler) = 0; |
89 | 92 |
90 // Returns the id of the remote application. For Connections created via | 93 // Returns the id of the remote application. For Connections created via |
91 // Shell::Connect(), this will not be determined until Connect()'s callback is | 94 // Shell::Connect(), this will not be determined until Connect()'s callback is |
92 // run, and this function will return false. Use AddRemoteIDCallback() to | 95 // run, and this function will return false. Use AddRemoteIDCallback() to |
93 // schedule a callback to be run when the remote application id is available. | 96 // schedule a callback to be run when the remote application id is available. |
94 // A value of Shell::kInvalidApplicationID indicates the connection has not | 97 // A value of Shell::kInvalidApplicationID indicates the connection has not |
(...skipping 16 matching lines...) Expand all Loading... |
111 | 114 |
112 protected: | 115 protected: |
113 virtual InterfaceRegistry* GetLocalRegistry() = 0; | 116 virtual InterfaceRegistry* GetLocalRegistry() = 0; |
114 | 117 |
115 virtual base::WeakPtr<Connection> GetWeakPtr() = 0; | 118 virtual base::WeakPtr<Connection> GetWeakPtr() = 0; |
116 }; | 119 }; |
117 | 120 |
118 } // namespace mojo | 121 } // namespace mojo |
119 | 122 |
120 #endif // MOJO_SHELL_PUBLIC_CPP_CONNECTION_H_ | 123 #endif // MOJO_SHELL_PUBLIC_CPP_CONNECTION_H_ |
OLD | NEW |