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

Unified Diff: mojo/shell/context.cc

Issue 399663002: Have mojo_shell run in its custom thread on android. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase Created 6 years, 5 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/context.h ('k') | mojo/shell/dbus_service_loader_linux.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/shell/context.cc
diff --git a/mojo/shell/context.cc b/mojo/shell/context.cc
index a5e5f42666215deb17b372d5cbcdd737b926956c..0eba764383ac43cd1403220fb563d7513fe5ebab 100644
--- a/mojo/shell/context.cc
+++ b/mojo/shell/context.cc
@@ -19,6 +19,7 @@
#include "mojo/shell/in_process_dynamic_service_runner.h"
#include "mojo/shell/out_of_process_dynamic_service_runner.h"
#include "mojo/shell/switches.h"
+#include "mojo/shell/ui_service_loader_android.h"
#include "mojo/spy/spy.h"
#if defined(OS_LINUX)
@@ -103,6 +104,14 @@ Context::Context()
// The native viewport service synchronously waits for certain messages. If we
// don't run it on its own thread we can easily deadlock. Long term native
// viewport should run its own process so that this isn't an issue.
+#if defined(OS_ANDROID)
+ service_manager_.SetLoaderForURL(
+ scoped_ptr<ServiceLoader>(
+ new UIServiceLoader(
+ scoped_ptr<ServiceLoader>(new NativeViewportServiceLoader(this)),
+ this)),
+ GURL("mojo:mojo_native_viewport_service"));
+#else
service_manager_.SetLoaderForURL(
scoped_ptr<ServiceLoader>(
new BackgroundServiceLoader(
@@ -110,6 +119,7 @@ Context::Context()
"native_viewport",
base::MessageLoop::TYPE_UI)),
GURL("mojo:mojo_native_viewport_service"));
+#endif
#if defined(USE_AURA)
// TODO(sky): need a better way to find this. It shouldn't be linked in.
service_manager_.SetLoaderForURL(
« no previous file with comments | « mojo/shell/context.h ('k') | mojo/shell/dbus_service_loader_linux.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698