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

Unified Diff: content/public/common/mojo_application_info.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/gpu/gpu_process_control_impl.cc ('k') | content/public/common/mojo_application_info.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/public/common/mojo_application_info.h
diff --git a/content/public/common/mojo_application_info.h b/content/public/common/mojo_application_info.h
index 72513bdfd8362aeaf6e1ac6121b974a1ab8eacc8..b5bcc4477c6ad6d8a79b4e86e96151a320924938 100644
--- a/content/public/common/mojo_application_info.h
+++ b/content/public/common/mojo_application_info.h
@@ -18,6 +18,8 @@ class SingleThreadTaskRunner;
namespace content {
+// MojoApplicationInfo provides details necessary to construct and bind new
+// instances of embedded Mojo applications.
struct CONTENT_EXPORT MojoApplicationInfo {
using ApplicationFactory = base::Callback<std::unique_ptr<shell::ShellClient>(
const base::Closure& quit_closure)>;
@@ -26,8 +28,21 @@ struct CONTENT_EXPORT MojoApplicationInfo {
MojoApplicationInfo(const MojoApplicationInfo& other);
~MojoApplicationInfo();
+ // A factory function which will be called to produce a new ShellClient
+ // instance for this app whenever one is needed.
ApplicationFactory application_factory;
+
+ // The task runner on which to construct and bind new ShellClient instances
+ // for this app. If null, behavior depends on the value of |use_own_thread|
+ // below.
scoped_refptr<base::SingleThreadTaskRunner> application_task_runner;
+
+ // If |application_task_runner| is null, setting this to |true| will give
+ // each instance of this app its own thread to run on. Setting this to |false|
+ // (the default) will instead run the app on the main thread's task runner.
+ //
+ // If |application_task_runner| is not null, this value is ignored.
+ bool use_own_thread = false;
};
} // namespace content
« no previous file with comments | « content/gpu/gpu_process_control_impl.cc ('k') | content/public/common/mojo_application_info.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698