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/basictypes.h" | 10 #include "base/basictypes.h" |
(...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
143 private: | 143 private: |
144 class ContentHandlerConnection; | 144 class ContentHandlerConnection; |
145 | 145 |
146 typedef std::map<std::string, ApplicationLoader*> SchemeToLoaderMap; | 146 typedef std::map<std::string, ApplicationLoader*> SchemeToLoaderMap; |
147 typedef std::map<GURL, ApplicationLoader*> URLToLoaderMap; | 147 typedef std::map<GURL, ApplicationLoader*> URLToLoaderMap; |
148 typedef std::map<GURL, ShellImpl*> URLToShellImplMap; | 148 typedef std::map<GURL, ShellImpl*> URLToShellImplMap; |
149 typedef std::map<GURL, ContentHandlerConnection*> URLToContentHandlerMap; | 149 typedef std::map<GURL, ContentHandlerConnection*> URLToContentHandlerMap; |
150 typedef std::map<GURL, std::vector<std::string>> URLToArgsMap; | 150 typedef std::map<GURL, std::vector<std::string>> URLToArgsMap; |
151 typedef std::map<std::string, GURL> MimeTypeToURLMap; | 151 typedef std::map<std::string, GURL> MimeTypeToURLMap; |
152 | 152 |
153 bool ConnectToRunningApplication(const GURL& application_url, | 153 bool ConnectToRunningApplication(const GURL& resolved_url, |
154 const GURL& requestor_url, | 154 const GURL& requestor_url, |
155 InterfaceRequest<ServiceProvider>* services, | 155 InterfaceRequest<ServiceProvider>* services, |
156 ServiceProviderPtr* exposed_services); | 156 ServiceProviderPtr* exposed_services); |
157 | 157 |
158 bool ConnectToApplicationWithLoader( | 158 bool ConnectToApplicationWithLoader( |
159 const GURL& requested_url, | 159 const GURL& requested_url, |
160 const GURL& resolved_url, | 160 const GURL& resolved_url, |
161 const GURL& requestor_url, | 161 const GURL& requestor_url, |
162 InterfaceRequest<ServiceProvider>* services, | 162 InterfaceRequest<ServiceProvider>* services, |
163 ServiceProviderPtr* exposed_services, | 163 ServiceProviderPtr* exposed_services, |
164 ApplicationLoader* loader); | 164 ApplicationLoader* loader); |
165 | 165 |
166 InterfaceRequest<Application> RegisterShell( | 166 InterfaceRequest<Application> RegisterShell( |
167 const GURL& requested_url, | 167 // The original URL requested by client, before any resolution or |
| 168 // redirects. |
| 169 // This is mostly useless and should be removed. |
| 170 const GURL& original_url, |
| 171 // The URL after resolution and redirects, including the querystring. |
168 const GURL& resolved_url, | 172 const GURL& resolved_url, |
169 const GURL& requestor_url, | 173 const GURL& requestor_url, |
170 InterfaceRequest<ServiceProvider> services, | 174 InterfaceRequest<ServiceProvider> services, |
171 ServiceProviderPtr exposed_services); | 175 ServiceProviderPtr exposed_services); |
172 | 176 |
173 ShellImpl* GetShellImpl(const GURL& url); | 177 ShellImpl* GetShellImpl(const GURL& url); |
174 | 178 |
175 void ConnectToClient(ShellImpl* shell_impl, | 179 void ConnectToClient(ShellImpl* shell_impl, |
176 const GURL& url, | 180 const GURL& resolved_url, |
177 const GURL& requestor_url, | 181 const GURL& requestor_url, |
178 InterfaceRequest<ServiceProvider> services, | 182 InterfaceRequest<ServiceProvider> services, |
179 ServiceProviderPtr exposed_services); | 183 ServiceProviderPtr exposed_services); |
180 | 184 |
181 void HandleFetchCallback(const GURL& requested_url, | 185 void HandleFetchCallback(const GURL& requested_url, |
182 const GURL& requestor_url, | 186 const GURL& requestor_url, |
183 InterfaceRequest<ServiceProvider> services, | 187 InterfaceRequest<ServiceProvider> services, |
184 ServiceProviderPtr exposed_services, | 188 ServiceProviderPtr exposed_services, |
185 NativeRunner::CleanupBehavior cleanup_behavior, | 189 NativeRunner::CleanupBehavior cleanup_behavior, |
186 scoped_ptr<Fetcher> fetcher); | 190 scoped_ptr<Fetcher> fetcher); |
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
226 MimeTypeToURLMap mime_type_to_url_; | 230 MimeTypeToURLMap mime_type_to_url_; |
227 ScopedVector<NativeRunner> native_runners_; | 231 ScopedVector<NativeRunner> native_runners_; |
228 bool disable_cache_; | 232 bool disable_cache_; |
229 | 233 |
230 DISALLOW_COPY_AND_ASSIGN(ApplicationManager); | 234 DISALLOW_COPY_AND_ASSIGN(ApplicationManager); |
231 }; | 235 }; |
232 | 236 |
233 } // namespace mojo | 237 } // namespace mojo |
234 | 238 |
235 #endif // SHELL_APPLICATION_MANAGER_APPLICATION_MANAGER_H_ | 239 #endif // SHELL_APPLICATION_MANAGER_APPLICATION_MANAGER_H_ |
OLD | NEW |