summaryrefslogtreecommitdiffstats
path: root/mojo/edk/system/async_waiter.cc
diff options
context:
space:
mode:
Diffstat (limited to 'mojo/edk/system/async_waiter.cc')
-rw-r--r--mojo/edk/system/async_waiter.cc23
1 files changed, 23 insertions, 0 deletions
diff --git a/mojo/edk/system/async_waiter.cc b/mojo/edk/system/async_waiter.cc
new file mode 100644
index 0000000..d2e7000
--- /dev/null
+++ b/mojo/edk/system/async_waiter.cc
@@ -0,0 +1,23 @@
+// 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 "mojo/edk/system/async_waiter.h"
+
+namespace mojo {
+namespace edk {
+
+AsyncWaiter::AsyncWaiter(const AwakeCallback& callback) : callback_(callback) {
+}
+
+AsyncWaiter::~AsyncWaiter() {
+}
+
+bool AsyncWaiter::Awake(MojoResult result, uintptr_t context) {
+ callback_.Run(result);
+ delete this;
+ return false;
+}
+
+} // namespace edk
+} // namespace mojo