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 <utility> |
9 #include <vector> | 10 #include <vector> |
10 | 11 |
11 #include "base/macros.h" | 12 #include "base/macros.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/public/interfaces/application.mojom.h" | 15 #include "mojo/application/public/interfaces/application.mojom.h" |
15 #include "mojo/application/public/interfaces/application_manager.mojom.h" | 16 #include "mojo/application/public/interfaces/application_manager.mojom.h" |
16 #include "mojo/application/public/interfaces/service_provider.mojom.h" | 17 #include "mojo/application/public/interfaces/service_provider.mojom.h" |
17 #include "mojo/application/public/interfaces/shell.mojom.h" | 18 #include "mojo/application/public/interfaces/shell.mojom.h" |
18 #include "mojo/common/weak_interface_ptr_set.h" | 19 #include "mojo/common/weak_interface_ptr_set.h" |
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
71 base::TaskRunner* task_runner); | 72 base::TaskRunner* task_runner); |
72 ~ApplicationManager(); | 73 ~ApplicationManager(); |
73 | 74 |
74 // Loads a service if necessary and establishes a new client connection. | 75 // Loads a service if necessary and establishes a new client connection. |
75 // Please see the comments in connect_to_application_params.h for more details | 76 // Please see the comments in connect_to_application_params.h for more details |
76 // about the parameters. | 77 // about the parameters. |
77 void ConnectToApplication(scoped_ptr<ConnectToApplicationParams> params); | 78 void ConnectToApplication(scoped_ptr<ConnectToApplicationParams> params); |
78 | 79 |
79 // Sets the default Loader to be used if not overridden by SetLoaderForURL(). | 80 // Sets the default Loader to be used if not overridden by SetLoaderForURL(). |
80 void set_default_loader(scoped_ptr<ApplicationLoader> loader) { | 81 void set_default_loader(scoped_ptr<ApplicationLoader> loader) { |
81 default_loader_ = loader.Pass(); | 82 default_loader_ = std::move(loader); |
82 } | 83 } |
83 | 84 |
84 // Sets a Loader to be used for a specific url. | 85 // Sets a Loader to be used for a specific url. |
85 void SetLoaderForURL(scoped_ptr<ApplicationLoader> loader, const GURL& url); | 86 void SetLoaderForURL(scoped_ptr<ApplicationLoader> loader, const GURL& url); |
86 | 87 |
87 // Destroys all Shell-ends of connections established with Applications. | 88 // Destroys all Shell-ends of connections established with Applications. |
88 // Applications connected by this ApplicationManager will observe pipe errors | 89 // Applications connected by this ApplicationManager will observe pipe errors |
89 // and have a chance to shutdown. | 90 // and have a chance to shutdown. |
90 void TerminateShellConnections(); | 91 void TerminateShellConnections(); |
91 | 92 |
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
156 | 157 |
157 DISALLOW_COPY_AND_ASSIGN(ApplicationManager); | 158 DISALLOW_COPY_AND_ASSIGN(ApplicationManager); |
158 }; | 159 }; |
159 | 160 |
160 Shell::ConnectToApplicationCallback EmptyConnectCallback(); | 161 Shell::ConnectToApplicationCallback EmptyConnectCallback(); |
161 | 162 |
162 } // namespace shell | 163 } // namespace shell |
163 } // namespace mojo | 164 } // namespace mojo |
164 | 165 |
165 #endif // MOJO_SHELL_APPLICATION_MANAGER_H_ | 166 #endif // MOJO_SHELL_APPLICATION_MANAGER_H_ |
OLD | NEW |