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 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
68 private: | 68 private: |
69 ApplicationManager* manager_; | 69 ApplicationManager* manager_; |
70 | 70 |
71 DISALLOW_COPY_AND_ASSIGN(TestAPI); | 71 DISALLOW_COPY_AND_ASSIGN(TestAPI); |
72 }; | 72 }; |
73 | 73 |
74 explicit ApplicationManager(Delegate* delegate); | 74 explicit ApplicationManager(Delegate* delegate); |
75 ~ApplicationManager(); | 75 ~ApplicationManager(); |
76 | 76 |
77 // Loads a service if necessary and establishes a new client connection. | 77 // Loads a service if necessary and establishes a new client connection. |
78 void ConnectToApplication(const GURL& application_url, | 78 void ConnectToApplication(mojo::URLRequestPtr application_url, |
79 const GURL& requestor_url, | 79 const GURL& requestor_url, |
80 InterfaceRequest<ServiceProvider> services, | 80 InterfaceRequest<ServiceProvider> services, |
81 ServiceProviderPtr exposed_services, | 81 ServiceProviderPtr exposed_services, |
82 const base::Closure& on_application_end); | 82 const base::Closure& on_application_end); |
83 | 83 |
84 template <typename Interface> | 84 template <typename Interface> |
85 inline void ConnectToService(const GURL& application_url, | 85 inline void ConnectToService(const GURL& application_url, |
86 InterfacePtr<Interface>* ptr) { | 86 InterfacePtr<Interface>* ptr) { |
87 ScopedMessagePipeHandle service_handle = | 87 ScopedMessagePipeHandle service_handle = |
88 ConnectToServiceByName(application_url, Interface::Name_); | 88 ConnectToServiceByName(application_url, Interface::Name_); |
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
148 using ApplicationPackagedAlias = std::map<GURL, std::pair<GURL, std::string>>; | 148 using ApplicationPackagedAlias = std::map<GURL, std::pair<GURL, std::string>>; |
149 using IdentityToShellImplMap = std::map<Identity, ShellImpl*>; | 149 using IdentityToShellImplMap = std::map<Identity, ShellImpl*>; |
150 using MimeTypeToURLMap = std::map<std::string, GURL>; | 150 using MimeTypeToURLMap = std::map<std::string, GURL>; |
151 using SchemeToLoaderMap = std::map<std::string, ApplicationLoader*>; | 151 using SchemeToLoaderMap = std::map<std::string, ApplicationLoader*>; |
152 using URLToContentHandlerMap = | 152 using URLToContentHandlerMap = |
153 std::map<std::pair<GURL, std::string>, ContentHandlerConnection*>; | 153 std::map<std::pair<GURL, std::string>, ContentHandlerConnection*>; |
154 using URLToLoaderMap = std::map<GURL, ApplicationLoader*>; | 154 using URLToLoaderMap = std::map<GURL, ApplicationLoader*>; |
155 using URLToNativeOptionsMap = std::map<GURL, NativeRunnerFactory::Options>; | 155 using URLToNativeOptionsMap = std::map<GURL, NativeRunnerFactory::Options>; |
156 | 156 |
157 void ConnectToApplicationInternal( | 157 void ConnectToApplicationInternal( |
158 const GURL& application_url, | 158 mojo::URLRequestPtr requested_url, |
159 const std::string& qualifier, | 159 const std::string& qualifier, |
160 const GURL& requestor_url, | 160 const GURL& requestor_url, |
161 InterfaceRequest<ServiceProvider> services, | 161 InterfaceRequest<ServiceProvider> services, |
162 ServiceProviderPtr exposed_services, | 162 ServiceProviderPtr exposed_services, |
163 const base::Closure& on_application_end); | 163 const base::Closure& on_application_end); |
164 | 164 |
165 bool ConnectToRunningApplication(const GURL& resolved_url, | 165 bool ConnectToRunningApplication(const GURL& resolved_url, |
166 const std::string& qualifier, | 166 const std::string& qualifier, |
167 const GURL& requestor_url, | 167 const GURL& requestor_url, |
168 InterfaceRequest<ServiceProvider>* services, | 168 InterfaceRequest<ServiceProvider>* services, |
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
248 bool disable_cache_; | 248 bool disable_cache_; |
249 base::WeakPtrFactory<ApplicationManager> weak_ptr_factory_; | 249 base::WeakPtrFactory<ApplicationManager> weak_ptr_factory_; |
250 | 250 |
251 DISALLOW_COPY_AND_ASSIGN(ApplicationManager); | 251 DISALLOW_COPY_AND_ASSIGN(ApplicationManager); |
252 }; | 252 }; |
253 | 253 |
254 } // namespace shell | 254 } // namespace shell |
255 } // namespace mojo | 255 } // namespace mojo |
256 | 256 |
257 #endif // SHELL_APPLICATION_MANAGER_APPLICATION_MANAGER_H_ | 257 #endif // SHELL_APPLICATION_MANAGER_APPLICATION_MANAGER_H_ |
OLD | NEW |