| 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_APPLICATION_MANAGER_APPLICATION_MANAGER_H_ | 5 #ifndef MOJO_APPLICATION_MANAGER_APPLICATION_MANAGER_H_ |
| 6 #define MOJO_APPLICATION_MANAGER_APPLICATION_MANAGER_H_ | 6 #define MOJO_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 102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 113 void ConnectToClient(ShellImpl* shell_impl, | 113 void ConnectToClient(ShellImpl* shell_impl, |
| 114 const GURL& url, | 114 const GURL& url, |
| 115 const GURL& requestor_url, | 115 const GURL& requestor_url, |
| 116 ServiceProviderPtr service_provider); | 116 ServiceProviderPtr service_provider); |
| 117 | 117 |
| 118 void RegisterLoadedApplication(const GURL& service_url, | 118 void RegisterLoadedApplication(const GURL& service_url, |
| 119 const GURL& requestor_url, | 119 const GURL& requestor_url, |
| 120 ServiceProviderPtr service_provider, | 120 ServiceProviderPtr service_provider, |
| 121 ScopedMessagePipeHandle* shell_handle); | 121 ScopedMessagePipeHandle* shell_handle); |
| 122 | 122 |
| 123 void LoadWithContentHandler(const GURL& content_url, | 123 void LoadWithContentHandler( |
| 124 const GURL& requestor_url, | 124 const GURL& content_url, |
| 125 const GURL& content_handler_url, | 125 const GURL& requestor_url, |
| 126 URLResponsePtr content, | 126 const GURL& content_handler_url, |
| 127 ServiceProviderPtr service_provider); | 127 URLResponsePtr url_response, |
| 128 URLLoaderPtr url_loader, |
| 129 ServiceProviderPtr service_provider); |
| 128 | 130 |
| 129 // Returns the Loader to use for a url (using default if not overridden.) | 131 // Returns the Loader to use for a url (using default if not overridden.) |
| 130 // The preference is to use a loader that's been specified for an url first, | 132 // The preference is to use a loader that's been specified for an url first, |
| 131 // then one that's been specified for a scheme, then the default. | 133 // then one that's been specified for a scheme, then the default. |
| 132 ApplicationLoader* GetLoaderForURL(const GURL& url); | 134 ApplicationLoader* GetLoaderForURL(const GURL& url); |
| 133 | 135 |
| 134 // Removes a ShellImpl when it encounters an error. | 136 // Removes a ShellImpl when it encounters an error. |
| 135 void OnShellImplError(ShellImpl* shell_impl); | 137 void OnShellImplError(ShellImpl* shell_impl); |
| 136 | 138 |
| 137 Delegate* delegate_; | 139 Delegate* delegate_; |
| 138 // Loader management. | 140 // Loader management. |
| 139 URLToLoaderMap url_to_loader_; | 141 URLToLoaderMap url_to_loader_; |
| 140 SchemeToLoaderMap scheme_to_loader_; | 142 SchemeToLoaderMap scheme_to_loader_; |
| 141 scoped_ptr<ApplicationLoader> default_loader_; | 143 scoped_ptr<ApplicationLoader> default_loader_; |
| 142 Interceptor* interceptor_; | 144 Interceptor* interceptor_; |
| 143 | 145 |
| 144 URLToShellImplMap url_to_shell_impl_; | 146 URLToShellImplMap url_to_shell_impl_; |
| 145 URLToContentHandlerMap url_to_content_handler_; | 147 URLToContentHandlerMap url_to_content_handler_; |
| 146 | 148 |
| 147 base::WeakPtrFactory<ApplicationManager> weak_ptr_factory_; | 149 base::WeakPtrFactory<ApplicationManager> weak_ptr_factory_; |
| 148 | 150 |
| 149 DISALLOW_COPY_AND_ASSIGN(ApplicationManager); | 151 DISALLOW_COPY_AND_ASSIGN(ApplicationManager); |
| 150 }; | 152 }; |
| 151 | 153 |
| 152 } // namespace mojo | 154 } // namespace mojo |
| 153 | 155 |
| 154 #endif // MOJO_APPLICATION_MANAGER_APPLICATION_MANAGER_H_ | 156 #endif // MOJO_APPLICATION_MANAGER_APPLICATION_MANAGER_H_ |
| OLD | NEW |