summaryrefslogtreecommitdiffstats
path: root/mojo/common/bindings_support_impl.h
blob: 2f08ba07e3ec405be2ff2531b5cdeb51c73f7e64 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
// Copyright 2013 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.

#ifndef MOJO_COMMON_BINDINGS_SUPPORT_IMPL_H_
#define MOJO_COMMON_BINDINGS_SUPPORT_IMPL_H_

#include "mojo/public/bindings/lib/bindings_support.h"

#include "base/basictypes.h"
#include "base/compiler_specific.h"
#include "base/memory/ref_counted.h"
#include "mojo/common/mojo_common_export.h"

namespace mojo {
namespace common {

class MOJO_COMMON_EXPORT BindingsSupportImpl
    : NON_EXPORTED_BASE(public BindingsSupport) {
 public:
  BindingsSupportImpl();
  virtual ~BindingsSupportImpl();

  // BindingsSupport methods:
  virtual Buffer* GetCurrentBuffer() OVERRIDE;
  virtual Buffer* SetCurrentBuffer(Buffer* buf) OVERRIDE;
  virtual AsyncWaitID AsyncWait(const Handle& handle, MojoWaitFlags flags,
                                AsyncWaitCallback* callback) OVERRIDE;
  virtual void CancelWait(AsyncWaitID async_wait_id) OVERRIDE;

 private:
  class Context;
  scoped_refptr<Context> context_;

  DISALLOW_COPY_AND_ASSIGN(BindingsSupportImpl);
};

}  // namespace common
}  // namespace mojo

#endif  // MOJO_COMMON_BINDINGS_SUPPORT_IMPL_H_