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

Side by Side Diff: mojo/public/tests/simple_bindings_support.h

Issue 54743003: Mojo: bindings connector (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Remove errant line from mojo.gyp Created 7 years, 1 month 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 | Annotate | Revision Log
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_TESTS_SIMPLE_BINDINGS_SUPPORT_H_
6 #define MOJO_PUBLIC_TESTS_SIMPLE_BINDINGS_SUPPORT_H_
7
8 #include <list>
9
10 #include "mojo/public/bindings/lib/bindings_support.h"
11
12 namespace mojo {
13 namespace test {
14
15 class SimpleBindingsSupport : public BindingsSupport {
16 public:
17 SimpleBindingsSupport();
18 virtual ~SimpleBindingsSupport();
19
20 virtual bool AsyncWait(Handle handle,
21 MojoWaitFlags flags,
22 MojoDeadline deadline,
23 AsyncWaitCallback* callback) MOJO_OVERRIDE;
24 virtual void CancelWait(AsyncWaitCallback* callback) MOJO_OVERRIDE;
25
26 // This method is called by unit tests to check the status of any handles
27 // that we are asynchronously waiting on and to dispatch callbacks for any
28 // handles that are ready.
29 void Process();
30
31 private:
32 bool IsReady(Handle handle, MojoWaitFlags flags, MojoResult* result);
33
34 struct Waiter {
35 Handle handle;
36 MojoWaitFlags flags;
37 MojoDeadline deadline;
38 AsyncWaitCallback* callback;
39 };
40
41 std::list<Waiter> waiters_;
42 };
43
44 } // namespace test
45 } // namespace mojo
46
47 #endif // MOJO_PUBLIC_TESTS_SIMPLE_BINDINGS_SUPPORT_H_
OLDNEW
« no previous file with comments | « mojo/public/tests/bindings_connector_unittest.cc ('k') | mojo/public/tests/simple_bindings_support.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698