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

Side by Side Diff: mojo/public/cpp/utility/run_loop_handler.h

Issue 2250183003: Make the fuchsia mojo/public repo the source of truth. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 4 years, 4 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
« no previous file with comments | « mojo/public/cpp/utility/run_loop.h ('k') | mojo/public/cpp/utility/tests/BUILD.gn » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright 2013 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 MOJO_PUBLIC_CPP_UTILITY_RUN_LOOP_HANDLER_H_
6 #define MOJO_PUBLIC_CPP_UTILITY_RUN_LOOP_HANDLER_H_
7
8 #include <mojo/result.h>
9 #include <stdint.h>
10
11 #include "mojo/public/cpp/system/handle.h"
12
13 namespace mojo {
14
15 // Used by RunLoop to notify when a handle is either ready or has become
16 // invalid.
17 class RunLoopHandler {
18 public:
19 using Id = uint64_t;
20
21 // Called when wait for the handle is ready (i.e., waiting yields
22 // MOJO_RESULT_OK).
23 virtual void OnHandleReady(Id id) = 0;
24
25 // Called when waiting for the handle is no longer valid (i.e., waiting yields
26 // the error |result|). This is also called with MOJO_RESULT_ABORTED if the
27 // RunLoop is destroyed.
28 virtual void OnHandleError(Id id, MojoResult result) = 0;
29
30 protected:
31 virtual ~RunLoopHandler() {}
32 };
33
34 } // namespace mojo
35
36 #endif // MOJO_PUBLIC_CPP_UTILITY_RUN_LOOP_HANDLER_H_
OLDNEW
« no previous file with comments | « mojo/public/cpp/utility/run_loop.h ('k') | mojo/public/cpp/utility/tests/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698