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_PUBLIC_APPLICATION_APPLICATION_IMPL_H_ | 5 #ifndef MOJO_PUBLIC_APPLICATION_APPLICATION_IMPL_H_ |
6 #define MOJO_PUBLIC_APPLICATION_APPLICATION_IMPL_H_ | 6 #define MOJO_PUBLIC_APPLICATION_APPLICATION_IMPL_H_ |
7 | 7 |
8 #include <memory> | 8 #include <memory> |
9 #include <string> | 9 #include <string> |
10 #include <vector> | 10 #include <vector> |
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
52 Shell* shell() const { return shell_.get(); } | 52 Shell* shell() const { return shell_.get(); } |
53 | 53 |
54 const std::string& url() const { return url_; } | 54 const std::string& url() const { return url_; } |
55 | 55 |
56 // Returns any initial configuration arguments, passed by the Shell. | 56 // Returns any initial configuration arguments, passed by the Shell. |
57 const std::vector<std::string>& args() const { return args_; } | 57 const std::vector<std::string>& args() const { return args_; } |
58 bool HasArg(const std::string& arg) const; | 58 bool HasArg(const std::string& arg) const; |
59 | 59 |
60 // Creates a new |ApplicationConnector|. The result can be bound to an | 60 // Creates a new |ApplicationConnector|. The result can be bound to an |
61 // |ApplicationConnectorPtr| and used to connect to other applications. (It | 61 // |ApplicationConnectorPtr| and used to connect to other applications. (It |
62 // returns an |InterfacePtrInfo| instead of an |InterfacePtr| to facilitate | 62 // returns an |InterfaceHandle| instead of an |InterfacePtr| to facilitate |
63 // passing it to another thread.) | 63 // passing it to another thread.) |
64 InterfacePtrInfo<ApplicationConnector> CreateApplicationConnector(); | 64 InterfaceHandle<ApplicationConnector> CreateApplicationConnector(); |
65 | 65 |
66 // Requests a new connection to an application. Returns a pointer to the | 66 // Requests a new connection to an application. Returns a pointer to the |
67 // connection if the connection is permitted by this application's delegate, | 67 // connection if the connection is permitted by this application's delegate, |
68 // or nullptr otherwise. Caller does not take ownership. The pointer remains | 68 // or nullptr otherwise. Caller does not take ownership. The pointer remains |
69 // valid until an error occurs on the connection with the Shell, or until the | 69 // valid until an error occurs on the connection with the Shell, or until the |
70 // ApplicationImpl is destroyed, whichever occurs first. | 70 // ApplicationImpl is destroyed, whichever occurs first. |
71 // TODO(vtl): Deprecate/remove this. | 71 // TODO(vtl): Deprecate/remove this. |
72 ApplicationConnection* ConnectToApplication(const String& application_url); | 72 ApplicationConnection* ConnectToApplication(const String& application_url); |
73 | 73 |
74 // Connect to application identified by |application_url| and connect to the | 74 // Connect to application identified by |application_url| and connect to the |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
110 ShellPtr shell_; | 110 ShellPtr shell_; |
111 std::string url_; | 111 std::string url_; |
112 std::vector<std::string> args_; | 112 std::vector<std::string> args_; |
113 | 113 |
114 MOJO_DISALLOW_COPY_AND_ASSIGN(ApplicationImpl); | 114 MOJO_DISALLOW_COPY_AND_ASSIGN(ApplicationImpl); |
115 }; | 115 }; |
116 | 116 |
117 } // namespace mojo | 117 } // namespace mojo |
118 | 118 |
119 #endif // MOJO_PUBLIC_APPLICATION_APPLICATION_IMPL_H_ | 119 #endif // MOJO_PUBLIC_APPLICATION_APPLICATION_IMPL_H_ |
OLD | NEW |