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

Unified Diff: mojo/shell/application_manager.h

Issue 1714753002: 7/ Eliminate on_application_end from ConnectParams (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@client_request
Patch Set: . 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « mojo/shell/application_instance.cc ('k') | mojo/shell/application_manager.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/shell/application_manager.h
diff --git a/mojo/shell/application_manager.h b/mojo/shell/application_manager.h
index 879ff4f447031da2595e81d683032737f6f655fa..f09dbe3667a7485115e7743965937fe74d7af8d0 100644
--- a/mojo/shell/application_manager.h
+++ b/mojo/shell/application_manager.h
@@ -71,6 +71,11 @@ class ApplicationManager : public ShellClient,
bool register_mojo_url_schemes);
~ApplicationManager() override;
+ // Provide a callback to be notified whenever an instance is destroyed.
+ // Typically the creator of the ApplicationManager will use this to determine
+ // when some set of instances it created are destroyed, so it can shut down.
+ void SetInstanceQuitCallback(base::Callback<void(const Identity&)> callback);
+
// Completes a connection between a source and target application as defined
// by |params|, exchanging InterfaceProviders between them. If no existing
// instance of the target application is running, one will be loaded.
@@ -125,7 +130,6 @@ class ApplicationManager : public ShellClient,
ApplicationInstance* CreateInstance(
const Identity& target_id,
- const base::Closure& on_application_end,
const String& application_name,
mojom::ShellClientRequest* request);
@@ -185,6 +189,7 @@ class ApplicationManager : public ShellClient,
WeakInterfacePtrSet<mojom::ApplicationManagerListener> listeners_;
+ base::Callback<void(const Identity&)> instance_quit_callback_;
base::TaskRunner* task_runner_;
scoped_ptr<NativeRunnerFactory> native_runner_factory_;
std::vector<scoped_ptr<NativeRunner>> native_runners_;
« no previous file with comments | « mojo/shell/application_instance.cc ('k') | mojo/shell/application_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698