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

Unified Diff: content/browser/mojo/mojo_shell_context.cc

Issue 1947313002: Enable content embedders to specify mojo application task runner. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: restores mojo:media in browser 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/browser/mojo/mojo_shell_context.h ('k') | content/child/process_control_impl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/mojo/mojo_shell_context.cc
diff --git a/content/browser/mojo/mojo_shell_context.cc b/content/browser/mojo/mojo_shell_context.cc
index b2297da604970b47cab8129f8008a73a5e17fc66..1760d20dd70b39da5391a1f9347d182cfaf9aa7e 100644
--- a/content/browser/mojo/mojo_shell_context.cc
+++ b/content/browser/mojo/mojo_shell_context.cc
@@ -48,9 +48,6 @@ namespace content {
namespace {
-// An extra set of apps to register on initialization, if set by a test.
-const MojoShellContext::StaticApplicationMap* g_applications_for_test;
-
void StartUtilityProcessOnIOThread(
mojo::InterfaceRequest<mojom::ProcessControl> request,
const base::string16& process_name,
@@ -222,11 +219,6 @@ class ShellConnectionListener : public MojoShellConnection::Listener {
base::LazyInstance<std::unique_ptr<MojoShellContext::Proxy>>
MojoShellContext::proxy_ = LAZY_INSTANCE_INITIALIZER;
-void MojoShellContext::SetApplicationsForTest(
- const StaticApplicationMap* apps) {
- g_applications_for_test = apps;
-}
-
MojoShellContext::MojoShellContext() {
proxy_.Get().reset(new Proxy(this));
@@ -260,17 +252,12 @@ MojoShellContext::MojoShellContext() {
std::unique_ptr<BrowserShellConnection> browser_shell_connection(
new BrowserShellConnection);
- StaticApplicationMap apps;
+ ContentBrowserClient::StaticMojoApplicationMap apps;
GetContentClient()->browser()->RegisterInProcessMojoApplications(&apps);
- if (g_applications_for_test) {
- // Add testing apps to the map, potentially overwriting whatever the
- // browser client registered.
- for (const auto& entry : *g_applications_for_test)
- apps[entry.first] = entry.second;
- }
for (const auto& entry : apps) {
browser_shell_connection->AddEmbeddedApplication(
- entry.first, entry.second, nullptr);
+ entry.first, entry.second.application_factory,
+ entry.second.application_task_runner);
}
ContentBrowserClient::OutOfProcessMojoApplicationMap sandboxed_apps;
« no previous file with comments | « content/browser/mojo/mojo_shell_context.h ('k') | content/child/process_control_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698