| 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 <utility> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 97 | 97 |
| 98 void CreateInstanceForHandle( | 98 void CreateInstanceForHandle( |
| 99 ScopedHandle channel, | 99 ScopedHandle channel, |
| 100 const GURL& url, | 100 const GURL& url, |
| 101 CapabilityFilterPtr filter, | 101 CapabilityFilterPtr filter, |
| 102 InterfaceRequest<mojom::PIDReceiver> pid_receiver); | 102 InterfaceRequest<mojom::PIDReceiver> pid_receiver); |
| 103 void AddListener(mojom::ApplicationManagerListenerPtr listener); | 103 void AddListener(mojom::ApplicationManagerListenerPtr listener); |
| 104 void GetRunningApplications( | 104 void GetRunningApplications( |
| 105 const Callback<void(Array<mojom::ApplicationInfoPtr>)>& callback); | 105 const Callback<void(Array<mojom::ApplicationInfoPtr>)>& callback); |
| 106 | 106 |
| 107 void ApplicationPIDAvailable(int id, base::ProcessId pid); | 107 void ApplicationPIDAvailable(uint32_t id, base::ProcessId pid); |
| 108 | 108 |
| 109 private: | 109 private: |
| 110 using IdentityToInstanceMap = std::map<Identity, ApplicationInstance*>; | 110 using IdentityToInstanceMap = std::map<Identity, ApplicationInstance*>; |
| 111 using URLToLoaderMap = std::map<GURL, ApplicationLoader*>; | 111 using URLToLoaderMap = std::map<GURL, ApplicationLoader*>; |
| 112 | 112 |
| 113 // Takes the contents of |params| only when it returns true. | 113 // Takes the contents of |params| only when it returns true. |
| 114 bool ConnectToRunningApplication( | 114 bool ConnectToRunningApplication( |
| 115 scoped_ptr<ConnectToApplicationParams>* params); | 115 scoped_ptr<ConnectToApplicationParams>* params); |
| 116 | 116 |
| 117 InterfaceRequest<Application> CreateAndConnectToInstance( | 117 InterfaceRequest<Application> CreateAndConnectToInstance( |
| (...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 161 | 161 |
| 162 DISALLOW_COPY_AND_ASSIGN(ApplicationManager); | 162 DISALLOW_COPY_AND_ASSIGN(ApplicationManager); |
| 163 }; | 163 }; |
| 164 | 164 |
| 165 Shell::ConnectToApplicationCallback EmptyConnectCallback(); | 165 Shell::ConnectToApplicationCallback EmptyConnectCallback(); |
| 166 | 166 |
| 167 } // namespace shell | 167 } // namespace shell |
| 168 } // namespace mojo | 168 } // namespace mojo |
| 169 | 169 |
| 170 #endif // MOJO_SHELL_APPLICATION_MANAGER_H_ | 170 #endif // MOJO_SHELL_APPLICATION_MANAGER_H_ |
| OLD | NEW |