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

Unified Diff: mojo/shell/context.cc

Issue 554163003: Revert of 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: Created 6 years, 3 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/BUILD.gn ('k') | mojo/shell/desktop/mojo_main.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 64db00b05a5023a766b05de76b2da85ca67c6408..203dec89aba13ba9782874ba4faaa495f1769441 100644
--- a/mojo/shell/context.cc
+++ b/mojo/shell/context.cc
@@ -21,23 +21,27 @@
#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/gpu_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"
#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/gpu_impl.h"
-#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 {
@@ -107,7 +111,6 @@
} // namespace
-#if defined(OS_ANDROID)
class Context::NativeViewportApplicationLoader
: public ApplicationLoader,
public ApplicationDelegate,
@@ -158,7 +161,6 @@
scoped_ptr<ApplicationImpl> app_;
DISALLOW_COPY_AND_ASSIGN(NativeViewportApplicationLoader);
};
-#endif
Context::Context() {
DCHECK(!base::MessageLoop::current());
@@ -199,6 +201,24 @@
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)
« no previous file with comments | « mojo/shell/BUILD.gn ('k') | mojo/shell/desktop/mojo_main.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698