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

Unified Diff: content/common/mojo/embedded_application_runner.h

Issue 1889253002: Remove uses of shell::Loader from content (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 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 | « content/child/process_control_impl.cc ('k') | content/common/mojo/embedded_application_runner.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/common/mojo/embedded_application_runner.h
diff --git a/content/common/mojo/embedded_application_runner.h b/content/common/mojo/embedded_application_runner.h
index 37b45897b9eb159ff82741b1e9b9c5d908f00fcb..737b503809f0fcbf8d18c23e838cd4058aad0160 100644
--- a/content/common/mojo/embedded_application_runner.h
+++ b/content/common/mojo/embedded_application_runner.h
@@ -10,6 +10,7 @@
#include "base/callback.h"
#include "base/macros.h"
#include "base/memory/ref_counted.h"
+#include "base/memory/weak_ptr.h"
#include "base/single_thread_task_runner.h"
#include "services/shell/public/cpp/shell_client.h"
#include "services/shell/public/interfaces/shell_client.mojom.h"
@@ -41,9 +42,15 @@ class EmbeddedApplicationRunner {
// bound to the running instance.
void BindShellClientRequest(shell::mojom::ShellClientRequest request);
+ // Sets a callback to run after the application loses its last connection and
+ // is torn down.
+ void SetQuitClosure(const base::Closure& quit_closure);
+
private:
class Instance;
+ void OnQuit();
+
// The TaskRunner on which the factory callback will be run. The
// shell::ShellClient it returns will live and die on this TaskRunner's
// thread.
@@ -53,6 +60,10 @@ class EmbeddedApplicationRunner {
// |application_task_runner_|'s thread.
scoped_refptr<Instance> instance_;
+ base::Closure quit_closure_;
+
+ base::WeakPtrFactory<EmbeddedApplicationRunner> weak_factory_;
+
DISALLOW_COPY_AND_ASSIGN(EmbeddedApplicationRunner);
};
« no previous file with comments | « content/child/process_control_impl.cc ('k') | content/common/mojo/embedded_application_runner.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698