Chromium Code Reviews| Index: mojo/edk/system/async_waiter.cc |
| diff --git a/mojo/edk/system/async_waiter.cc b/mojo/edk/system/async_waiter.cc |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..8bfde46a649b6f65e7c7fdc6525eeacc7dee86ea |
| --- /dev/null |
| +++ b/mojo/edk/system/async_waiter.cc |
| @@ -0,0 +1,26 @@ |
| +// Copyright 2013 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 "mojo/edk/system/async_waiter.h" |
| + |
| +#include "base/logging.h" |
|
viettrungluu
2014/12/12 21:39:30
Don't need either of these includes.
gmorrita
2014/12/12 22:56:27
Done.
|
| +#include "base/message_loop/message_loop.h" |
| + |
| +namespace mojo { |
| +namespace system { |
| + |
| +AsyncWaiter::AsyncWaiter(AwakeCallback callback) : callback_(callback) { |
| +} |
| + |
| +AsyncWaiter::~AsyncWaiter() { |
| +} |
| + |
| +bool AsyncWaiter::Awake(MojoResult result, uintptr_t context) { |
| + callback_.Run(result); |
| + delete this; |
| + return false; |
| +} |
| + |
| +} // namespace system |
| +} // namespace mojo |