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

Unified Diff: mojo/shell/context.cc

Issue 242763003: Implement a trivial Mojo EchoService that can be connected to over DBus (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase to switch MojoChannelInit to ChannelInit Created 6 years, 8 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/DEPS ('k') | mojo/shell/dbus_service_loader_linux.h » ('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 df86d14bfccdf3670fe5bbdfa2f717c5c7396db8..d5bb30e32d6030461ca8d011d931912e202dca94 100644
--- a/mojo/shell/context.cc
+++ b/mojo/shell/context.cc
@@ -5,6 +5,7 @@
#include "mojo/shell/context.h"
#include "base/command_line.h"
+#include "build/build_config.h"
#include "mojo/embedder/embedder.h"
#include "mojo/gles2/gles2_support_impl.h"
#include "mojo/service_manager/service_loader.h"
@@ -17,6 +18,10 @@
#include "mojo/shell/switches.h"
#include "mojo/spy/spy.h"
+#if defined(OS_LINUX)
+#include "mojo/shell/dbus_service_loader_linux.h"
+#endif // defined(OS_LINUX)
+
namespace mojo {
namespace shell {
@@ -66,6 +71,12 @@ Context::Context()
scoped_ptr<ServiceLoader>(new NativeViewportServiceLoader(this)),
GURL("mojo:mojo_native_viewport_service"));
+#if defined(OS_LINUX)
+ service_manager_.SetLoaderForScheme(
+ scoped_ptr<ServiceLoader>(new DBusServiceLoader(this)),
+ "dbus");
+#endif // defined(OS_LINUX)
+
if (cmdline->HasSwitch(switches::kSpy)) {
spy_.reset(new mojo::Spy(&service_manager_,
cmdline->GetSwitchValueASCII(switches::kSpy)));
« no previous file with comments | « mojo/shell/DEPS ('k') | mojo/shell/dbus_service_loader_linux.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698