OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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_SERVICES_PACKAGE_MANAGER_PACKAGE_MANAGER_H_ | 5 #ifndef MOJO_SERVICES_PACKAGE_MANAGER_PACKAGE_MANAGER_H_ |
6 #define MOJO_SERVICES_PACKAGE_MANAGER_PACKAGE_MANAGER_H_ | 6 #define MOJO_SERVICES_PACKAGE_MANAGER_PACKAGE_MANAGER_H_ |
7 | 7 |
8 #include "base/files/file_path.h" | 8 #include "base/files/file_path.h" |
9 #include "base/memory/weak_ptr.h" | 9 #include "base/memory/weak_ptr.h" |
10 #include "base/path_service.h" | 10 #include "base/path_service.h" |
11 #include "base/values.h" | 11 #include "base/values.h" |
12 #include "mojo/public/cpp/bindings/weak_binding_set.h" | 12 #include "mojo/public/cpp/bindings/binding_set.h" |
13 #include "mojo/services/package_manager/public/interfaces/catalog.mojom.h" | 13 #include "mojo/services/package_manager/public/interfaces/catalog.mojom.h" |
14 #include "mojo/services/package_manager/public/interfaces/resolver.mojom.h" | 14 #include "mojo/services/package_manager/public/interfaces/resolver.mojom.h" |
15 #include "mojo/services/package_manager/public/interfaces/shell_resolver.mojom.h
" | 15 #include "mojo/services/package_manager/public/interfaces/shell_resolver.mojom.h
" |
16 #include "mojo/shell/public/cpp/interface_factory.h" | 16 #include "mojo/shell/public/cpp/interface_factory.h" |
17 #include "mojo/shell/public/cpp/shell.h" | 17 #include "mojo/shell/public/cpp/shell.h" |
18 #include "mojo/shell/public/cpp/shell_client.h" | 18 #include "mojo/shell/public/cpp/shell_client.h" |
19 #include "url/gurl.h" | 19 #include "url/gurl.h" |
20 | 20 |
21 namespace package_manager { | 21 namespace package_manager { |
22 // A set of names of interfaces that may be exposed to an application. | 22 // A set of names of interfaces that may be exposed to an application. |
(...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
150 | 150 |
151 // Called once the manifest is read and |this| hasn't been deleted. | 151 // Called once the manifest is read and |this| hasn't been deleted. |
152 void OnReadManifestImpl(const GURL& url, | 152 void OnReadManifestImpl(const GURL& url, |
153 const std::string& qualifier, | 153 const std::string& qualifier, |
154 const ResolveMojoURLCallback& callback, | 154 const ResolveMojoURLCallback& callback, |
155 scoped_ptr<base::Value> manifest); | 155 scoped_ptr<base::Value> manifest); |
156 | 156 |
157 base::TaskRunner* blocking_pool_; | 157 base::TaskRunner* blocking_pool_; |
158 GURL system_package_dir_; | 158 GURL system_package_dir_; |
159 | 159 |
160 mojo::WeakBindingSet<mojom::Resolver> resolver_bindings_; | 160 mojo::BindingSet<mojom::Resolver> resolver_bindings_; |
161 mojo::WeakBindingSet<mojom::ShellResolver> shell_resolver_bindings_; | 161 mojo::BindingSet<mojom::ShellResolver> shell_resolver_bindings_; |
162 mojo::WeakBindingSet<mojom::Catalog> catalog_bindings_; | 162 mojo::BindingSet<mojom::Catalog> catalog_bindings_; |
163 | 163 |
164 scoped_ptr<ApplicationCatalogStore> catalog_store_; | 164 scoped_ptr<ApplicationCatalogStore> catalog_store_; |
165 std::map<GURL, ApplicationInfo> catalog_; | 165 std::map<GURL, ApplicationInfo> catalog_; |
166 | 166 |
167 // Used when an app handles multiple urls. Maps from app (as url) to url of | 167 // Used when an app handles multiple urls. Maps from app (as url) to url of |
168 // app that is responsible for handling it. The value is a pair of the | 168 // app that is responsible for handling it. The value is a pair of the |
169 // url of the handler along with a qualifier. | 169 // url of the handler along with a qualifier. |
170 MojoURLAliasMap mojo_url_aliases_; | 170 MojoURLAliasMap mojo_url_aliases_; |
171 | 171 |
172 base::WeakPtrFactory<PackageManager> weak_factory_; | 172 base::WeakPtrFactory<PackageManager> weak_factory_; |
173 | 173 |
174 DISALLOW_COPY_AND_ASSIGN(PackageManager); | 174 DISALLOW_COPY_AND_ASSIGN(PackageManager); |
175 }; | 175 }; |
176 | 176 |
177 } // namespace package_manager | 177 } // namespace package_manager |
178 | 178 |
179 #endif // MOJO_SERVICES_PACKAGE_MANAGER_PACKAGE_MANAGER_H_ | 179 #endif // MOJO_SERVICES_PACKAGE_MANAGER_PACKAGE_MANAGER_H_ |
OLD | NEW |