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

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

Issue 1978843003: Move in-GPU mojo:media app to new thread (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 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 ab4b5b529cbeb623ecd076e4dcd9bd270ceb2f85..017f093bfb1916aba0b0fd397f200168c619ffea 100644
--- a/content/common/mojo/embedded_application_runner.h
+++ b/content/common/mojo/embedded_application_runner.h
@@ -12,6 +12,8 @@
#include "base/memory/ref_counted.h"
#include "base/memory/weak_ptr.h"
#include "base/single_thread_task_runner.h"
+#include "base/strings/string_piece.h"
+#include "content/public/common/mojo_application_info.h"
#include "services/shell/public/cpp/shell_client.h"
#include "services/shell/public/interfaces/shell_client.mojom.h"
@@ -25,21 +27,11 @@ namespace content {
// EmbeddedApplicationRunner instance.
class EmbeddedApplicationRunner {
public:
- // Callback used to construct a new instance of the embedded application. Note
- // that |quit_closure| destroys the returned ShellClient instance when run.
- using FactoryCallback = base::Callback<
- std::unique_ptr<shell::ShellClient>(const base::Closure& quit_closure)>;
-
- // Constructs a runner which hosts the application on |task_runner|'s thread.
- // If an existing instance of the app is not running when an incoming
- // connection is made, |callback| will be run on |task_runner|'s thread to
- // create a new instance which will live on that thread.
- //
- // If |task_runner| is null, the calling thread's TaskRunner is used.
- EmbeddedApplicationRunner(
- const FactoryCallback& callback,
- const scoped_refptr<base::SingleThreadTaskRunner>& task_runner);
-
+ // Constructs a runner which hosts a Mojo application. If an existing instance
+ // of the app is not running when an incoming connection is made, details from
+ // |info| will be used to construct a new instance.
+ EmbeddedApplicationRunner(const base::StringPiece& name,
+ const MojoApplicationInfo& info);
~EmbeddedApplicationRunner();
// Binds an incoming ShellClientRequest for this application. If the
@@ -56,11 +48,6 @@ class EmbeddedApplicationRunner {
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.
- const scoped_refptr<base::SingleThreadTaskRunner> application_task_runner_;
-
// A reference to the application instance which may operate on the
// |application_task_runner_|'s thread.
scoped_refptr<Instance> instance_;
« 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