| Index: mojo/examples/echo/echo_client.cc
|
| diff --git a/mojo/examples/echo/echo_client.cc b/mojo/examples/echo/echo_client.cc
|
| deleted file mode 100644
|
| index 1d44d08e03f9ffa1bcf36d79c9b21903a896a3a9..0000000000000000000000000000000000000000
|
| --- a/mojo/examples/echo/echo_client.cc
|
| +++ /dev/null
|
| @@ -1,44 +0,0 @@
|
| -// Copyright 2014 The Chromium Authors. All rights reserved.
|
| -// Use of this source code is governed by a BSD-style license that can be
|
| -// found in the LICENSE file.
|
| -
|
| -#include <stdio.h>
|
| -
|
| -#include "mojo/examples/echo/echo_service.mojom.h"
|
| -#include "mojo/public/c/system/main.h"
|
| -#include "mojo/public/cpp/application/application_delegate.h"
|
| -#include "mojo/public/cpp/application/application_impl.h"
|
| -#include "mojo/public/cpp/application/application_runner.h"
|
| -#include "mojo/public/cpp/utility/run_loop.h"
|
| -
|
| -namespace mojo {
|
| -namespace examples {
|
| -
|
| -class ResponsePrinter {
|
| - public:
|
| - void Run(const String& value) const {
|
| - printf("Response: \"%s\"\n", value.get().c_str());
|
| -
|
| - RunLoop::current()->Quit(); // All done!
|
| - }
|
| -};
|
| -
|
| -class EchoClientDelegate : public ApplicationDelegate {
|
| - public:
|
| - virtual void Initialize(ApplicationImpl* app) override {
|
| - app->ConnectToService("mojo:echo_service", &echo_service_);
|
| -
|
| - echo_service_->EchoString("hello world", ResponsePrinter());
|
| - }
|
| -
|
| - private:
|
| - EchoServicePtr echo_service_;
|
| -};
|
| -
|
| -} // namespace examples
|
| -} // namespace mojo
|
| -
|
| -MojoResult MojoMain(MojoHandle shell_handle) {
|
| - mojo::ApplicationRunner runner(new mojo::examples::EchoClientDelegate);
|
| - return runner.Run(shell_handle);
|
| -}
|
|
|