Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(329)

Side by Side Diff: mojo/shell/application_manager.h

Issue 1738663002: Hook embedded shell up to MojoShellConnection (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: self review Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
73 // Provide a callback to be notified whenever an instance is destroyed. 73 // Provide a callback to be notified whenever an instance is destroyed.
74 // Typically the creator of the ApplicationManager will use this to determine 74 // Typically the creator of the ApplicationManager will use this to determine
75 // when some set of instances it created are destroyed, so it can shut down. 75 // when some set of instances it created are destroyed, so it can shut down.
76 void SetInstanceQuitCallback(base::Callback<void(const Identity&)> callback); 76 void SetInstanceQuitCallback(base::Callback<void(const Identity&)> callback);
77 77
78 // Completes a connection between a source and target application as defined 78 // Completes a connection between a source and target application as defined
79 // by |params|, exchanging InterfaceProviders between them. If no existing 79 // by |params|, exchanging InterfaceProviders between them. If no existing
80 // instance of the target application is running, one will be loaded. 80 // instance of the target application is running, one will be loaded.
81 void Connect(scoped_ptr<ConnectParams> params); 81 void Connect(scoped_ptr<ConnectParams> params);
82 82
83 // Creates a new ApplicationInstance for the target application identified by
84 // |params|. No resolution is done on the target URL and there must not be any
85 // existing instances for the given URL. Returns a pending ShellClientRequest
86 // for the instance.
Ben Goodger (Google) 2016/02/25 03:02:58 I'm wondering if we can make this method sound les
Ken Rockot(use gerrit already) 2016/02/25 04:42:05 sgtm and done
87 mojom::ShellClientRequest CreateInstanceForURL(
88 scoped_ptr<ConnectParams> params);
89
83 // Sets the default Loader to be used if not overridden by SetLoaderForURL(). 90 // Sets the default Loader to be used if not overridden by SetLoaderForURL().
84 void set_default_loader(scoped_ptr<ApplicationLoader> loader) { 91 void set_default_loader(scoped_ptr<ApplicationLoader> loader) {
85 default_loader_ = std::move(loader); 92 default_loader_ = std::move(loader);
86 } 93 }
87 94
88 // Sets a Loader to be used for a specific url. 95 // Sets a Loader to be used for a specific url.
89 void SetLoaderForURL(scoped_ptr<ApplicationLoader> loader, const GURL& url); 96 void SetLoaderForURL(scoped_ptr<ApplicationLoader> loader, const GURL& url);
90 97
91 // Destroys all Shell-ends of connections established with Applications. 98 // Destroys all Shell-ends of connections established with Applications.
92 // Applications connected by this ApplicationManager will observe pipe errors 99 // Applications connected by this ApplicationManager will observe pipe errors
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after
193 200
194 DISALLOW_COPY_AND_ASSIGN(ApplicationManager); 201 DISALLOW_COPY_AND_ASSIGN(ApplicationManager);
195 }; 202 };
196 203
197 mojom::Shell::ConnectCallback EmptyConnectCallback(); 204 mojom::Shell::ConnectCallback EmptyConnectCallback();
198 205
199 } // namespace shell 206 } // namespace shell
200 } // namespace mojo 207 } // namespace mojo
201 208
202 #endif // MOJO_SHELL_APPLICATION_MANAGER_H_ 209 #endif // MOJO_SHELL_APPLICATION_MANAGER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698