• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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 
ExampleServiceImpl()11 ExampleServiceImpl::ExampleServiceImpl() {}
12 
~ExampleServiceImpl()13 ExampleServiceImpl::~ExampleServiceImpl() {}
14 
Ping(uint16_t ping_value)15 void ExampleServiceImpl::Ping(uint16_t ping_value) {
16   client()->Pong(ping_value);
17   RunLoop::current()->Quit();
18 }
19 
RunCallback(const Callback<void ()> & callback)20 void ExampleServiceImpl::RunCallback(const Callback<void()>& callback) {
21   callback.Run();
22   RunLoop::current()->Quit();
23 }
24 
25 }  // namespace mojo
26