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 SHELL_APPLICATION_MANAGER_APPLICATION_MANAGER_H_ | 5 #ifndef SHELL_APPLICATION_MANAGER_APPLICATION_MANAGER_H_ |
6 #define SHELL_APPLICATION_MANAGER_APPLICATION_MANAGER_H_ | 6 #define SHELL_APPLICATION_MANAGER_APPLICATION_MANAGER_H_ |
7 | 7 |
8 #include <map> | 8 #include <map> |
9 | 9 |
10 #include "base/macros.h" | 10 #include "base/macros.h" |
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
103 // Sets a Loader to be used for a specific url. | 103 // Sets a Loader to be used for a specific url. |
104 void SetLoaderForURL(scoped_ptr<ApplicationLoader> loader, const GURL& url); | 104 void SetLoaderForURL(scoped_ptr<ApplicationLoader> loader, const GURL& url); |
105 // Sets a Loader to be used for a specific url scheme. | 105 // Sets a Loader to be used for a specific url scheme. |
106 void SetLoaderForScheme(scoped_ptr<ApplicationLoader> loader, | 106 void SetLoaderForScheme(scoped_ptr<ApplicationLoader> loader, |
107 const std::string& scheme); | 107 const std::string& scheme); |
108 // These strings will be passed to the Initialize() method when an Application | 108 // These strings will be passed to the Initialize() method when an Application |
109 // is instantiated. | 109 // is instantiated. |
110 // TODO(vtl): Maybe we should store/compare resolved URLs, like | 110 // TODO(vtl): Maybe we should store/compare resolved URLs, like |
111 // SetNativeOptionsForURL() below? | 111 // SetNativeOptionsForURL() below? |
112 void SetArgsForURL(const std::vector<std::string>& args, const GURL& url); | 112 void SetArgsForURL(const std::vector<std::string>& args, const GURL& url); |
113 // These options will be used in running any native application at |url|. | 113 // These options will be used in running any native application at |url| |
114 // (|url| will be mapped and resolved, and any application whose resolved URL | 114 // (which shouldn't contain a query string). (|url| will be mapped and |
115 // matches it will have |options| applied.) | 115 // resolved, and any application whose base resolved URL matches it will have |
| 116 // |options| applied.) |
116 // TODO(vtl): This may not do what's desired if the resolved URL results in an | 117 // TODO(vtl): This may not do what's desired if the resolved URL results in an |
117 // HTTP redirect. Really, we want options to be identified with a particular | 118 // HTTP redirect. Really, we want options to be identified with a particular |
118 // implementation, maybe via a signed manifest or something like that. | 119 // implementation, maybe via a signed manifest or something like that. |
119 void SetNativeOptionsForURL(const NativeRunnerFactory::Options& options, | 120 void SetNativeOptionsForURL(const NativeRunnerFactory::Options& options, |
120 const GURL& url); | 121 const GURL& url); |
121 | 122 |
122 // Destroys all Shell-ends of connections established with Applications. | 123 // Destroys all Shell-ends of connections established with Applications. |
123 // Applications connected by this ApplicationManager will observe pipe errors | 124 // Applications connected by this ApplicationManager will observe pipe errors |
124 // and have a chance to shutdown. | 125 // and have a chance to shutdown. |
125 void TerminateShellConnections(); | 126 void TerminateShellConnections(); |
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
222 ScopedVector<NativeRunner> native_runners_; | 223 ScopedVector<NativeRunner> native_runners_; |
223 bool disable_cache_; | 224 bool disable_cache_; |
224 | 225 |
225 DISALLOW_COPY_AND_ASSIGN(ApplicationManager); | 226 DISALLOW_COPY_AND_ASSIGN(ApplicationManager); |
226 }; | 227 }; |
227 | 228 |
228 } // namespace shell | 229 } // namespace shell |
229 } // namespace mojo | 230 } // namespace mojo |
230 | 231 |
231 #endif // SHELL_APPLICATION_MANAGER_APPLICATION_MANAGER_H_ | 232 #endif // SHELL_APPLICATION_MANAGER_APPLICATION_MANAGER_H_ |
OLD | NEW |