Upstream version 11.39.266.0
[platform/framework/web/crosswalk.git] / src / mojo / examples / apptest / example_service_impl.cc
1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #include "mojo/examples/apptest/example_service_impl.h"
6
7 #include "mojo/public/cpp/utility/run_loop.h"
8
9 namespace mojo {
10
11 ExampleServiceImpl::ExampleServiceImpl() {}
12
13 ExampleServiceImpl::~ExampleServiceImpl() {}
14
15 void ExampleServiceImpl::Ping(uint16_t ping_value) {
16   client()->Pong(ping_value);
17   RunLoop::current()->Quit();
18 }
19
20 void ExampleServiceImpl::RunCallback(const Callback<void()>& callback) {
21   callback.Run();
22   RunLoop::current()->Quit();
23 }
24
25 }  // namespace mojo