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

Unified Diff: mojo/shell/context.cc

Issue 568883003: Second attempt to land change to remove NativeViewportService and (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase 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 203dec89aba13ba9782874ba4faaa495f1769441..64db00b05a5023a766b05de76b2da85ca67c6408 100644
--- a/mojo/shell/context.cc
+++ b/mojo/shell/context.cc
@@ -21,28 +21,24 @@
#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 {
namespace {
@@ -111,6 +107,7 @@ class EmptyServiceProvider : public InterfaceImpl<ServiceProvider> {
} // namespace
+#if defined(OS_ANDROID)
class Context::NativeViewportApplicationLoader
: public ApplicationLoader,
public ApplicationDelegate,
@@ -161,6 +158,7 @@ class Context::NativeViewportApplicationLoader
scoped_ptr<ApplicationImpl> app_;
DISALLOW_COPY_AND_ASSIGN(NativeViewportApplicationLoader);
};
+#endif
Context::Context() {
DCHECK(!base::MessageLoop::current());
@@ -201,24 +199,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)
« 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