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

Unified Diff: mojo/shell/context.cc

Issue 477923004: Create native_viewport_service, don't build it into mojo_shell unless Android (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Get the static build to work Created 6 years, 4 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
« mojo/services/native_viewport/main.cc ('K') | « mojo/shell/context.h ('k') | no next file » | 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 a6585e2d701bed1f2cbc7d0c4f0f6879dd0a0fdc..4a99aeb474f7fce88e5178d2fe67fe14821c39de 100644
--- a/mojo/shell/context.cc
+++ b/mojo/shell/context.cc
@@ -18,7 +18,6 @@
#include "mojo/public/cpp/application/application_connection.h"
#include "mojo/public/cpp/application/application_delegate.h"
#include "mojo/public/cpp/application/application_impl.h"
-#include "mojo/services/native_viewport/native_viewport_impl.h"
#include "mojo/shell/dynamic_application_loader.h"
#include "mojo/shell/in_process_dynamic_service_runner.h"
#include "mojo/shell/out_of_process_dynamic_service_runner.h"
@@ -31,6 +30,7 @@
#endif // defined(OS_LINUX)
#if defined(OS_ANDROID)
+#include "mojo/services/native_viewport/native_viewport_impl.h"
#include "mojo/shell/network_application_loader.h"
#endif // defined(OS_ANDROID)
@@ -92,7 +92,8 @@ void InitContentHandlers(DynamicApplicationLoader* loader,
} // namespace
-class Context::NativeViewportApplicationLoader
+#if defined(OS_ANDROID)
+class NativeViewportApplicationLoader
: public ApplicationLoader,
public ApplicationDelegate,
public InterfaceFactory<NativeViewport> {
@@ -129,6 +130,7 @@ class Context::NativeViewportApplicationLoader
scoped_ptr<ApplicationImpl> app_;
DISALLOW_COPY_AND_ASSIGN(NativeViewportApplicationLoader);
};
+#endif
Context::Context() {
DCHECK(!base::MessageLoop::current());
@@ -164,18 +166,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.
« mojo/services/native_viewport/main.cc ('K') | « mojo/shell/context.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698