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_APPLICATION_MANAGER_H_ | 5 #ifndef MOJO_SHELL_APPLICATION_MANAGER_H_ |
6 #define MOJO_SHELL_APPLICATION_MANAGER_H_ | 6 #define MOJO_SHELL_APPLICATION_MANAGER_H_ |
7 | 7 |
8 #include <map> | 8 #include <map> |
9 | 9 |
10 #include "base/macros.h" | 10 #include "base/macros.h" |
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
77 DISALLOW_COPY_AND_ASSIGN(TestAPI); | 77 DISALLOW_COPY_AND_ASSIGN(TestAPI); |
78 }; | 78 }; |
79 | 79 |
80 explicit ApplicationManager(Delegate* delegate); | 80 explicit ApplicationManager(Delegate* delegate); |
81 ~ApplicationManager(); | 81 ~ApplicationManager(); |
82 | 82 |
83 // Loads a service if necessary and establishes a new client connection. | 83 // Loads a service if necessary and establishes a new client connection. |
84 // |originator| can be NULL (e.g. for the first application or in tests), but | 84 // |originator| can be NULL (e.g. for the first application or in tests), but |
85 // typically is non-NULL and identifies the instance initiating the | 85 // typically is non-NULL and identifies the instance initiating the |
86 // connection. | 86 // connection. |
87 // TODO(yzshen): Remove |requestor_url|. | 87 // Please see the comments in connect_to_application_params.h for more details |
88 // about the parameters. | |
88 void ConnectToApplication( | 89 void ConnectToApplication( |
89 ApplicationInstance* originator, | 90 ApplicationInstance* originator, |
90 URLRequestPtr requested_url, | 91 URLRequestPtr app_url_request, |
sky
2015/09/03 19:48:52
I think requested_url is more descriptive.
yzshen1
2015/09/03 19:52:58
I tried to use exactly the same names as the field
sky
2015/09/03 19:58:18
You are right, sounds good.
| |
91 const std::string& qualifier, | 92 const std::string& qualifier, |
92 const GURL& requestor_url, | |
93 InterfaceRequest<ServiceProvider> services, | 93 InterfaceRequest<ServiceProvider> services, |
94 ServiceProviderPtr exposed_services, | 94 ServiceProviderPtr exposed_services, |
95 const CapabilityFilter& capability_filter, | 95 const CapabilityFilter& filter, |
96 const base::Closure& on_application_end, | 96 const base::Closure& on_application_end, |
97 const Shell::ConnectToApplicationCallback& connect_callback); | 97 const Shell::ConnectToApplicationCallback& connect_callback); |
98 | 98 |
99 void ConnectToApplication(scoped_ptr<ConnectToApplicationParams> params); | 99 void ConnectToApplication(scoped_ptr<ConnectToApplicationParams> params); |
100 | 100 |
101 // Must only be used by shell internals and test code as it does not forward | 101 // Must only be used by shell internals and test code as it does not forward |
102 // capability filters. | 102 // capability filters. |
103 template <typename Interface> | 103 template <typename Interface> |
104 inline void ConnectToService(const GURL& application_url, | 104 inline void ConnectToService(const GURL& application_url, |
105 InterfacePtr<Interface>* ptr) { | 105 InterfacePtr<Interface>* ptr) { |
(...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
253 | 253 |
254 DISALLOW_COPY_AND_ASSIGN(ApplicationManager); | 254 DISALLOW_COPY_AND_ASSIGN(ApplicationManager); |
255 }; | 255 }; |
256 | 256 |
257 Shell::ConnectToApplicationCallback EmptyConnectCallback(); | 257 Shell::ConnectToApplicationCallback EmptyConnectCallback(); |
258 | 258 |
259 } // namespace shell | 259 } // namespace shell |
260 } // namespace mojo | 260 } // namespace mojo |
261 | 261 |
262 #endif // MOJO_SHELL_APPLICATION_MANAGER_H_ | 262 #endif // MOJO_SHELL_APPLICATION_MANAGER_H_ |
OLD | NEW |