Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(179)

Side by Side Diff: third_party/mojo/src/mojo/edk/system/async_waiter.h

Issue 1676913002: [mojo] Delete third_party/mojo (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(Empty)
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 #ifndef THIRD_PARTY_MOJO_SRC_MOJO_EDK_SYSTEM_ASYNC_WAITER_H_
6 #define THIRD_PARTY_MOJO_SRC_MOJO_EDK_SYSTEM_ASYNC_WAITER_H_
7
8 #include "base/callback.h"
9 #include "mojo/public/c/system/types.h"
10 #include "mojo/public/cpp/system/macros.h"
11 #include "third_party/mojo/src/mojo/edk/system/awakable.h"
12 #include "third_party/mojo/src/mojo/edk/system/system_impl_export.h"
13
14 namespace mojo {
15 namespace system {
16
17 // An |Awakable| implementation that just calls a given callback object.
18 class MOJO_SYSTEM_IMPL_EXPORT AsyncWaiter final : public Awakable {
19 public:
20 using AwakeCallback = base::Callback<void(MojoResult)>;
21
22 // |callback| must satisfy the same contract as |Awakable::Awake()|.
23 explicit AsyncWaiter(const AwakeCallback& callback);
24 virtual ~AsyncWaiter();
25
26 private:
27 // |Awakable| implementation:
28 bool Awake(MojoResult result, uintptr_t context) override;
29
30 AwakeCallback callback_;
31
32 MOJO_DISALLOW_COPY_AND_ASSIGN(AsyncWaiter);
33 };
34
35 } // namespace system
36 } // namespace mojo
37
38 #endif // THIRD_PARTY_MOJO_SRC_MOJO_EDK_SYSTEM_ASYNC_WAITER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698