| 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 #include <set> |
| 9 | 10 |
| 10 #include "base/basictypes.h" | 11 #include "base/basictypes.h" |
| 11 #include "base/gtest_prod_util.h" | 12 #include "base/gtest_prod_util.h" |
| 12 #include "base/memory/scoped_ptr.h" | 13 #include "base/memory/scoped_ptr.h" |
| 13 #include "base/memory/weak_ptr.h" | 14 #include "base/memory/weak_ptr.h" |
| 14 #include "mojo/application_manager/application_loader.h" | 15 #include "mojo/application_manager/application_loader.h" |
| 15 #include "mojo/application_manager/application_manager_export.h" | 16 #include "mojo/application_manager/application_manager_export.h" |
| 16 #include "mojo/public/interfaces/application/service_provider.mojom.h" | 17 #include "mojo/public/interfaces/application/service_provider.mojom.h" |
| 17 #include "url/gurl.h" | 18 #include "url/gurl.h" |
| 18 | 19 |
| (...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 135 ServiceProviderPtr service_provider); | 136 ServiceProviderPtr service_provider); |
| 136 | 137 |
| 137 // Returns the Loader to use for a url (using default if not overridden.) | 138 // Returns the Loader to use for a url (using default if not overridden.) |
| 138 // The preference is to use a loader that's been specified for an url first, | 139 // The preference is to use a loader that's been specified for an url first, |
| 139 // then one that's been specified for a scheme, then the default. | 140 // then one that's been specified for a scheme, then the default. |
| 140 ApplicationLoader* GetLoaderForURL(const GURL& url); | 141 ApplicationLoader* GetLoaderForURL(const GURL& url); |
| 141 | 142 |
| 142 // Removes a ShellImpl when it encounters an error. | 143 // Removes a ShellImpl when it encounters an error. |
| 143 void OnShellImplError(ShellImpl* shell_impl); | 144 void OnShellImplError(ShellImpl* shell_impl); |
| 144 | 145 |
| 146 // Returns the arguments for the given url. |
| 147 Array<String> GetArgsForURL(const GURL& url); |
| 148 |
| 145 Delegate* delegate_; | 149 Delegate* delegate_; |
| 146 // Loader management. | 150 // Loader management. |
| 147 URLToLoaderMap url_to_loader_; | 151 URLToLoaderMap url_to_loader_; |
| 148 SchemeToLoaderMap scheme_to_loader_; | 152 SchemeToLoaderMap scheme_to_loader_; |
| 149 scoped_ptr<ApplicationLoader> default_loader_; | 153 scoped_ptr<ApplicationLoader> default_loader_; |
| 150 Interceptor* interceptor_; | 154 Interceptor* interceptor_; |
| 151 | 155 |
| 152 URLToShellImplMap url_to_shell_impl_; | 156 URLToShellImplMap url_to_shell_impl_; |
| 153 URLToContentHandlerMap url_to_content_handler_; | 157 URLToContentHandlerMap url_to_content_handler_; |
| 154 URLToArgsMap url_to_args_; | 158 URLToArgsMap url_to_args_; |
| 159 std::set<ShellImpl*> content_shell_impls_; |
| 155 | 160 |
| 156 base::WeakPtrFactory<ApplicationManager> weak_ptr_factory_; | 161 base::WeakPtrFactory<ApplicationManager> weak_ptr_factory_; |
| 157 | 162 |
| 158 DISALLOW_COPY_AND_ASSIGN(ApplicationManager); | 163 DISALLOW_COPY_AND_ASSIGN(ApplicationManager); |
| 159 }; | 164 }; |
| 160 | 165 |
| 161 } // namespace mojo | 166 } // namespace mojo |
| 162 | 167 |
| 163 #endif // MOJO_APPLICATION_MANAGER_APPLICATION_MANAGER_H_ | 168 #endif // MOJO_APPLICATION_MANAGER_APPLICATION_MANAGER_H_ |
| OLD | NEW |