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