| 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& requested_url, |
| 154 const GURL& application_url, |
| 154 const GURL& requestor_url, | 155 const GURL& requestor_url, |
| 155 InterfaceRequest<ServiceProvider>* services, | 156 InterfaceRequest<ServiceProvider>* services, |
| 156 ServiceProviderPtr* exposed_services); | 157 ServiceProviderPtr* exposed_services); |
| 157 | 158 |
| 158 bool ConnectToApplicationWithLoader( | 159 bool ConnectToApplicationWithLoader( |
| 159 const GURL& requested_url, | 160 const GURL& requested_url, |
| 160 const GURL& resolved_url, | 161 const GURL& resolved_url, |
| 161 const GURL& requestor_url, | 162 const GURL& requestor_url, |
| 162 InterfaceRequest<ServiceProvider>* services, | 163 InterfaceRequest<ServiceProvider>* services, |
| 163 ServiceProviderPtr* exposed_services, | 164 ServiceProviderPtr* exposed_services, |
| 164 ApplicationLoader* loader); | 165 ApplicationLoader* loader); |
| 165 | 166 |
| 166 InterfaceRequest<Application> RegisterShell( | 167 InterfaceRequest<Application> RegisterShell( |
| 167 const GURL& requested_url, | 168 const GURL& requested_url, |
| 168 const GURL& resolved_url, | 169 GURL resolved_url, |
| 169 const GURL& requestor_url, | 170 const GURL& requestor_url, |
| 170 InterfaceRequest<ServiceProvider> services, | 171 InterfaceRequest<ServiceProvider> services, |
| 171 ServiceProviderPtr exposed_services); | 172 ServiceProviderPtr exposed_services, |
| 173 ShellImpl::QueryHandlingBehavior query_behavior); |
| 172 | 174 |
| 173 ShellImpl* GetShellImpl(const GURL& url); | 175 ShellImpl* GetShellImpl(const GURL& url); |
| 174 | 176 |
| 175 void ConnectToClient(ShellImpl* shell_impl, | 177 void ConnectToClient(ShellImpl* shell_impl, |
| 176 const GURL& url, | 178 const GURL& requested_url, |
| 179 const GURL& resolved_url, |
| 177 const GURL& requestor_url, | 180 const GURL& requestor_url, |
| 178 InterfaceRequest<ServiceProvider> services, | 181 InterfaceRequest<ServiceProvider> services, |
| 179 ServiceProviderPtr exposed_services); | 182 ServiceProviderPtr exposed_services); |
| 180 | 183 |
| 181 void HandleFetchCallback(const GURL& requested_url, | 184 void HandleFetchCallback(const GURL& requested_url, |
| 182 const GURL& requestor_url, | 185 const GURL& requestor_url, |
| 183 InterfaceRequest<ServiceProvider> services, | 186 InterfaceRequest<ServiceProvider> services, |
| 184 ServiceProviderPtr exposed_services, | 187 ServiceProviderPtr exposed_services, |
| 185 NativeRunner::CleanupBehavior cleanup_behavior, | 188 NativeRunner::CleanupBehavior cleanup_behavior, |
| 186 scoped_ptr<Fetcher> fetcher); | 189 scoped_ptr<Fetcher> fetcher); |
| (...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 226 MimeTypeToURLMap mime_type_to_url_; | 229 MimeTypeToURLMap mime_type_to_url_; |
| 227 ScopedVector<NativeRunner> native_runners_; | 230 ScopedVector<NativeRunner> native_runners_; |
| 228 bool disable_cache_; | 231 bool disable_cache_; |
| 229 | 232 |
| 230 DISALLOW_COPY_AND_ASSIGN(ApplicationManager); | 233 DISALLOW_COPY_AND_ASSIGN(ApplicationManager); |
| 231 }; | 234 }; |
| 232 | 235 |
| 233 } // namespace mojo | 236 } // namespace mojo |
| 234 | 237 |
| 235 #endif // SHELL_APPLICATION_MANAGER_APPLICATION_MANAGER_H_ | 238 #endif // SHELL_APPLICATION_MANAGER_APPLICATION_MANAGER_H_ |
| OLD | NEW |