Index: mojo/shell/context.cc |
diff --git a/mojo/shell/context.cc b/mojo/shell/context.cc |
index 6ab04b328f7ef8527434d9bccba9a8d170b1f785..607151d70a5395e8adf7e289ffc527695dc2f5bc 100644 |
--- a/mojo/shell/context.cc |
+++ b/mojo/shell/context.cc |
@@ -29,20 +29,17 @@ |
#include "mojo/shell/switches.h" |
#include "mojo/shell/ui_application_loader_android.h" |
#include "mojo/spy/spy.h" |
-#include "ui/gl/gl_share_group.h" |
#if defined(OS_LINUX) |
#include "mojo/shell/dbus_application_loader_linux.h" |
#endif // defined(OS_LINUX) |
#if defined(OS_ANDROID) |
+#include "mojo/services/native_viewport/native_viewport_impl.h" |
#include "mojo/shell/network_application_loader.h" |
+#include "ui/gl/gl_share_group.h" |
#endif // defined(OS_ANDROID) |
-#if defined(USE_AURA) |
-#include "mojo/shell/view_manager_loader.h" |
-#endif |
- |
namespace mojo { |
namespace shell { |
namespace { |
@@ -106,11 +103,11 @@ class EmptyServiceProvider : public InterfaceImpl<ServiceProvider> { |
} // namespace |
-class Context::NativeViewportApplicationLoader |
- : public ApplicationLoader, |
- public ApplicationDelegate, |
- public InterfaceFactory<NativeViewport>, |
- public InterfaceFactory<Gpu> { |
+#if defined(OS_ANDROID) |
+class NativeViewportApplicationLoader : public ApplicationLoader, |
+ public ApplicationDelegate, |
+ public InterfaceFactory<NativeViewport>, |
+ public InterfaceFactory<Gpu> { |
public: |
NativeViewportApplicationLoader() |
: share_group_(new gfx::GLShareGroup), |
@@ -156,6 +153,7 @@ class Context::NativeViewportApplicationLoader |
scoped_ptr<ApplicationImpl> app_; |
DISALLOW_COPY_AND_ASSIGN(NativeViewportApplicationLoader); |
}; |
+#endif |
Context::Context() { |
DCHECK(!base::MessageLoop::current()); |
@@ -196,24 +194,6 @@ void Context::Init() { |
scoped_ptr<ApplicationLoader>(new NativeViewportApplicationLoader()), |
this)), |
GURL("mojo:mojo_native_viewport_service")); |
-#else |
- { |
- scoped_ptr<BackgroundShellApplicationLoader> loader( |
- new BackgroundShellApplicationLoader( |
- scoped_ptr<ApplicationLoader>( |
- new NativeViewportApplicationLoader()), |
- "native_viewport", |
- base::MessageLoop::TYPE_UI)); |
- application_manager_.SetLoaderForURL( |
- loader.PassAs<ApplicationLoader>(), |
- 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. |
- application_manager_.SetLoaderForURL( |
- scoped_ptr<ApplicationLoader>(new ViewManagerLoader()), |
- GURL("mojo:mojo_view_manager")); |
#endif |
#if defined(OS_LINUX) |