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

Side by Side Diff: mojo/public/utility/bindings_support_impl.h

Issue 134253004: Mojo: AsyncWaiter and mojo/public/environment (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: add missing files Created 6 years, 11 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 | 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_UTILITY_BINDINGS_SUPPORT_IMPL_H_
6 #define MOJO_PUBLIC_UTILITY_BINDINGS_SUPPORT_IMPL_H_
7
8 #include "mojo/public/bindings/lib/bindings_support.h"
9 #include "mojo/public/system/macros.h"
10
11 namespace mojo {
12 namespace internal {
13
14 // BindingsSupport implementation that uses RunLoop. Before using this you must
15 // have created a RunLoop on the current thread.
16 // You shouldn't create this directly, instead use Environment.
17 class BindingsSupportImpl : public BindingsSupport {
18 public:
19 BindingsSupportImpl();
20 virtual ~BindingsSupportImpl();
21
22 // Sets up state needed for BindingsSupportImpl. This must be invoked before
23 // creating a BindingsSupportImpl.
24 static void SetUp();
25
26 // Cleans state created by Setup().
27 static void TearDown();
28
29 // BindingsSupport methods:
30 virtual Buffer* GetCurrentBuffer() MOJO_OVERRIDE;
31 virtual Buffer* SetCurrentBuffer(Buffer* buf) MOJO_OVERRIDE;
32 virtual AsyncWaitID AsyncWait(const Handle& handle,
33 MojoWaitFlags flags,
34 AsyncWaitCallback* callback) MOJO_OVERRIDE;
35 virtual void CancelWait(AsyncWaitID async_wait_id) MOJO_OVERRIDE;
36
37 private:
38 MOJO_DISALLOW_COPY_AND_ASSIGN(BindingsSupportImpl);
39 };
40
41 } // namespace internal
42 } // namespace mojo
43
44 #endif // MOJO_PUBLIC_UTILITY_BINDINGS_SUPPORT_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698