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_SHELL_APPLICATION_MANAGER_H_ | 5 #ifndef MOJO_SHELL_APPLICATION_MANAGER_H_ |
6 #define MOJO_SHELL_APPLICATION_MANAGER_H_ | 6 #define MOJO_SHELL_APPLICATION_MANAGER_H_ |
7 | 7 |
8 #include <map> | 8 #include <map> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
11 #include "base/macros.h" | 11 #include "base/macros.h" |
12 #include "base/memory/scoped_ptr.h" | 12 #include "base/memory/scoped_ptr.h" |
13 #include "base/memory/weak_ptr.h" | 13 #include "base/memory/weak_ptr.h" |
14 #include "mojo/public/cpp/bindings/weak_binding_set.h" | 14 #include "mojo/public/cpp/bindings/binding_set.h" |
15 #include "mojo/public/cpp/bindings/weak_interface_ptr_set.h" | 15 #include "mojo/public/cpp/bindings/interface_ptr_set.h" |
16 #include "mojo/services/package_manager/package_manager.h" | 16 #include "mojo/services/package_manager/package_manager.h" |
17 #include "mojo/services/package_manager/public/interfaces/shell_resolver.mojom.h
" | 17 #include "mojo/services/package_manager/public/interfaces/shell_resolver.mojom.h
" |
18 #include "mojo/shell/application_loader.h" | 18 #include "mojo/shell/application_loader.h" |
19 #include "mojo/shell/capability_filter.h" | 19 #include "mojo/shell/capability_filter.h" |
20 #include "mojo/shell/connect_params.h" | 20 #include "mojo/shell/connect_params.h" |
21 #include "mojo/shell/identity.h" | 21 #include "mojo/shell/identity.h" |
22 #include "mojo/shell/native_runner.h" | 22 #include "mojo/shell/native_runner.h" |
23 #include "mojo/shell/public/cpp/interface_factory.h" | 23 #include "mojo/shell/public/cpp/interface_factory.h" |
24 #include "mojo/shell/public/cpp/shell_client.h" | 24 #include "mojo/shell/public/cpp/shell_client.h" |
25 #include "mojo/shell/public/interfaces/application_manager.mojom.h" | 25 #include "mojo/shell/public/interfaces/application_manager.mojom.h" |
(...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
179 // Loaders are chosen in the order they are listed here. | 179 // Loaders are chosen in the order they are listed here. |
180 URLToLoaderMap url_to_loader_; | 180 URLToLoaderMap url_to_loader_; |
181 scoped_ptr<ApplicationLoader> default_loader_; | 181 scoped_ptr<ApplicationLoader> default_loader_; |
182 | 182 |
183 IdentityToInstanceMap identity_to_instance_; | 183 IdentityToInstanceMap identity_to_instance_; |
184 | 184 |
185 IdentityToShellClientFactoryMap shell_client_factories_; | 185 IdentityToShellClientFactoryMap shell_client_factories_; |
186 // Counter used to assign ids to content handlers. | 186 // Counter used to assign ids to content handlers. |
187 uint32_t shell_client_factory_id_counter_; | 187 uint32_t shell_client_factory_id_counter_; |
188 | 188 |
189 WeakInterfacePtrSet<mojom::ApplicationManagerListener> listeners_; | 189 InterfacePtrSet<mojom::ApplicationManagerListener> listeners_; |
190 | 190 |
191 base::Callback<void(const Identity&)> instance_quit_callback_; | 191 base::Callback<void(const Identity&)> instance_quit_callback_; |
192 base::TaskRunner* file_task_runner_; | 192 base::TaskRunner* file_task_runner_; |
193 scoped_ptr<NativeRunnerFactory> native_runner_factory_; | 193 scoped_ptr<NativeRunnerFactory> native_runner_factory_; |
194 std::vector<scoped_ptr<NativeRunner>> native_runners_; | 194 std::vector<scoped_ptr<NativeRunner>> native_runners_; |
195 scoped_ptr<ShellConnection> shell_connection_; | 195 scoped_ptr<ShellConnection> shell_connection_; |
196 WeakBindingSet<mojom::ApplicationManager> bindings_; | 196 BindingSet<mojom::ApplicationManager> bindings_; |
197 base::WeakPtrFactory<ApplicationManager> weak_ptr_factory_; | 197 base::WeakPtrFactory<ApplicationManager> weak_ptr_factory_; |
198 | 198 |
199 DISALLOW_COPY_AND_ASSIGN(ApplicationManager); | 199 DISALLOW_COPY_AND_ASSIGN(ApplicationManager); |
200 }; | 200 }; |
201 | 201 |
202 mojom::Connector::ConnectCallback EmptyConnectCallback(); | 202 mojom::Connector::ConnectCallback EmptyConnectCallback(); |
203 | 203 |
204 } // namespace shell | 204 } // namespace shell |
205 } // namespace mojo | 205 } // namespace mojo |
206 | 206 |
207 #endif // MOJO_SHELL_APPLICATION_MANAGER_H_ | 207 #endif // MOJO_SHELL_APPLICATION_MANAGER_H_ |
OLD | NEW |