summaryrefslogtreecommitdiffstats
path: root/mojo/shell
diff options
context:
space:
mode:
authorcmasone@chromium.org <cmasone@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-05-01 23:30:06 +0000
committercmasone@chromium.org <cmasone@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-05-01 23:30:06 +0000
commit8110218d6bbce9092fe3afc2d683af735d8909ba (patch)
treeffddd7a74d4f16e6cb9b0cddb7f7cc973783b573 /mojo/shell
parenta0a380053dd2697c893bc9b42e04ac07193f588f (diff)
downloadchromium_src-8110218d6bbce9092fe3afc2d683af735d8909ba.zip
chromium_src-8110218d6bbce9092fe3afc2d683af735d8909ba.tar.gz
chromium_src-8110218d6bbce9092fe3afc2d683af735d8909ba.tar.bz2
Generalize DBus-Mojo bootstrapping code
Most of the code to bootstrap a Mojo service over DBus is moved into a templated class under mojo/dbus. Simply implement your Mojo service and then specialize DBusExternalService with your service implementation. TBR=darin@chromium.org BUG=chromium:367816 TEST=run mojo_dbus_echo_service in one shell, and then ./out/Debug/mojo_shell --origin=http://127.0.0.1:4444 --disable-cache mojo:mojo_dbus_echo in the other. Review URL: https://codereview.chromium.org/245253004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@267662 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'mojo/shell')
-rw-r--r--mojo/shell/dbus_service_loader_linux.cc3
1 files changed, 2 insertions, 1 deletions
diff --git a/mojo/shell/dbus_service_loader_linux.cc b/mojo/shell/dbus_service_loader_linux.cc
index a476d25..6485496 100644
--- a/mojo/shell/dbus_service_loader_linux.cc
+++ b/mojo/shell/dbus_service_loader_linux.cc
@@ -17,6 +17,7 @@
#include "dbus/object_path.h"
#include "dbus/object_proxy.h"
#include "mojo/common/channel_init.h"
+#include "mojo/dbus/dbus_external_service.h"
#include "mojo/embedder/platform_channel_pair.h"
#include "mojo/public/cpp/bindings/allocation_scope.h"
#include "mojo/public/cpp/bindings/interface.h"
@@ -94,7 +95,7 @@ class DBusServiceLoader::LoadContext : public mojo::ExternalServiceHost {
service_dbus_proxy_ =
bus_->GetObjectProxy(service_name, dbus::ObjectPath(object_path));
- dbus::MethodCall call("org.chromium.Mojo", "ConnectChannel");
+ dbus::MethodCall call(kMojoDBusInterface, kMojoDBusConnectMethod);
dbus::MessageWriter writer(&call);
writer.AppendFileDescriptor(*client_fd.get());