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 | 9 |
10 #include "base/macros.h" | 10 #include "base/macros.h" |
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
85 // Destroys all Shell-ends of connections established with Applications. | 85 // Destroys all Shell-ends of connections established with Applications. |
86 // Applications connected by this ApplicationManager will observe pipe errors | 86 // Applications connected by this ApplicationManager will observe pipe errors |
87 // and have a chance to shutdown. | 87 // and have a chance to shutdown. |
88 void TerminateShellConnections(); | 88 void TerminateShellConnections(); |
89 | 89 |
90 // Removes a ApplicationInstance when it encounters an error. | 90 // Removes a ApplicationInstance when it encounters an error. |
91 void OnApplicationInstanceError(ApplicationInstance* instance); | 91 void OnApplicationInstanceError(ApplicationInstance* instance); |
92 | 92 |
93 ApplicationInstance* GetApplicationInstance(const Identity& identity) const; | 93 ApplicationInstance* GetApplicationInstance(const Identity& identity) const; |
94 | 94 |
95 void CreateInstanceForHandle(ScopedHandle channel, | 95 void CreateInstanceForHandle(ScopedHandle channel, const GURL& url); |
96 const GURL& url, | |
97 const std::string& qualifier); | |
98 | 96 |
99 private: | 97 private: |
100 using IdentityToInstanceMap = std::map<Identity, ApplicationInstance*>; | 98 using IdentityToInstanceMap = std::map<Identity, ApplicationInstance*>; |
101 using URLToLoaderMap = std::map<GURL, ApplicationLoader*>; | 99 using URLToLoaderMap = std::map<GURL, ApplicationLoader*>; |
102 | 100 |
103 // Takes the contents of |params| only when it returns true. | 101 // Takes the contents of |params| only when it returns true. |
104 bool ConnectToRunningApplication( | 102 bool ConnectToRunningApplication( |
105 scoped_ptr<ConnectToApplicationParams>* params); | 103 scoped_ptr<ConnectToApplicationParams>* params); |
106 | 104 |
107 InterfaceRequest<Application> CreateAndConnectToInstance( | 105 InterfaceRequest<Application> CreateAndConnectToInstance( |
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
145 | 143 |
146 DISALLOW_COPY_AND_ASSIGN(ApplicationManager); | 144 DISALLOW_COPY_AND_ASSIGN(ApplicationManager); |
147 }; | 145 }; |
148 | 146 |
149 Shell::ConnectToApplicationCallback EmptyConnectCallback(); | 147 Shell::ConnectToApplicationCallback EmptyConnectCallback(); |
150 | 148 |
151 } // namespace shell | 149 } // namespace shell |
152 } // namespace mojo | 150 } // namespace mojo |
153 | 151 |
154 #endif // MOJO_SHELL_APPLICATION_MANAGER_H_ | 152 #endif // MOJO_SHELL_APPLICATION_MANAGER_H_ |
OLD | NEW |