Index: mojo/examples/dbus_echo/dbus_echo_app.cc |
diff --git a/mojo/examples/dbus_echo/dbus_echo_app.cc b/mojo/examples/dbus_echo/dbus_echo_app.cc |
index 459ad216283b1acf2a7c0e9403819f3b9d5b936d..13bf8e02499d8cbe17d547c33216e04f0e835240 100644 |
--- a/mojo/examples/dbus_echo/dbus_echo_app.cc |
+++ b/mojo/examples/dbus_echo/dbus_echo_app.cc |
@@ -8,7 +8,6 @@ |
#include "base/bind.h" |
#include "base/logging.h" |
#include "mojo/public/cpp/bindings/allocation_scope.h" |
-#include "mojo/public/cpp/bindings/remote_ptr.h" |
#include "mojo/public/cpp/environment/environment.h" |
#include "mojo/public/cpp/shell/application.h" |
#include "mojo/public/cpp/system/core.h" |
@@ -30,14 +29,13 @@ |
namespace mojo { |
namespace examples { |
-class DBusEchoApp : public Application, public mojo::EchoClient { |
+class DBusEchoApp : public Application { |
public: |
explicit DBusEchoApp(MojoHandle shell_handle) : Application(shell_handle) { |
- InterfacePipe<EchoService, AnyInterface> echo_pipe; |
- mojo::AllocationScope scope; |
- shell()->Connect("dbus:org.chromium.EchoService/org/chromium/MojoImpl", |
- echo_pipe.handle_to_peer.Pass()); |
- echo_service_.reset(echo_pipe.handle_to_self.Pass(), this); |
+ ConnectTo("dbus:org.chromium.EchoService/org/chromium/MojoImpl", |
+ &echo_service_); |
+ |
+ AllocationScope scope; |
echo_service_->Echo("who", base::Bind(&DBusEchoApp::OnEcho, |
base::Unretained(this))); |
} |
@@ -46,11 +44,11 @@ class DBusEchoApp : public Application, public mojo::EchoClient { |
} |
private: |
- void OnEcho(const mojo::String& echoed) { |
+ void OnEcho(const String& echoed) { |
LOG(INFO) << "echo'd " << echoed.To<std::string>(); |
} |
- RemotePtr<EchoService> echo_service_; |
+ EchoServicePtr echo_service_; |
}; |
} // namespace examples |