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

Unified Diff: mojo/shell/shell.h

Issue 1810713002: Cascade shutdown of instances (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@55all_users
Patch Set: . Created 4 years, 9 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « mojo/shell/manifest.json ('k') | mojo/shell/shell.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/shell/shell.h
diff --git a/mojo/shell/shell.h b/mojo/shell/shell.h
index 8b9f975275c62fb52d69f41cf1d8d0acc802b948..c060518034b2f5513b7a0fb8125384e2c750e675 100644
--- a/mojo/shell/shell.h
+++ b/mojo/shell/shell.h
@@ -87,11 +87,6 @@ class Shell : public ShellClient {
private:
class Instance;
- using IdentityToInstanceMap = std::map<Identity, Instance*>;
- using NameToLoaderMap = std::map<std::string, Loader*>;
- using IdentityToShellClientFactoryMap =
- std::map<Identity, mojom::ShellClientFactoryPtr>;
-
// ShellClient:
bool AcceptConnection(Connection* connection) override;
@@ -125,7 +120,8 @@ class Shell : public ShellClient {
// and this function returns true.
bool ConnectToExistingInstance(scoped_ptr<ConnectParams>* params);
- Instance* CreateInstance(const Identity& target,
+ Instance* CreateInstance(const Identity& source,
+ const Identity& target,
const CapabilitySpec& spec);
// Called from the instance implementing mojom::Shell.
@@ -168,20 +164,22 @@ class Shell : public ShellClient {
// is no loader configured for the name.
Loader* GetLoaderForName(const std::string& name);
+ base::WeakPtr<Shell> GetWeakPtr();
+
void CleanupRunner(NativeRunner* runner);
// Loader management.
// Loaders are chosen in the order they are listed here.
- NameToLoaderMap name_to_loader_;
+ std::map<std::string, Loader*> name_to_loader_;
scoped_ptr<Loader> default_loader_;
- IdentityToInstanceMap identity_to_instance_;
+ std::map<Identity, Instance*> identity_to_instance_;
// Tracks the names of instances that are allowed to field connection requests
// from all users.
std::set<std::string> singletons_;
- IdentityToShellClientFactoryMap shell_client_factories_;
+ std::map<Identity, mojom::ShellClientFactoryPtr> shell_client_factories_;
// Counter used to assign ids to client factories.
uint32_t shell_client_factory_id_counter_;
« no previous file with comments | « mojo/shell/manifest.json ('k') | mojo/shell/shell.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698