Upstream version 5.34.104.0
[platform/framework/web/crosswalk.git] / src / mojo / public / bindings / allocation_scope.h
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 MOJO_PUBLIC_BINDINGS_ALLOCATION_SCOPE_H_
6 #define MOJO_PUBLIC_BINDINGS_ALLOCATION_SCOPE_H_
7
8 #include "mojo/public/bindings/lib/scratch_buffer.h"
9 #include "mojo/public/system/macros.h"
10
11 namespace mojo {
12
13 class AllocationScope {
14  public:
15   AllocationScope() {}
16   ~AllocationScope() {}
17
18   Buffer* buffer() { return &buffer_; }
19
20  private:
21   internal::ScratchBuffer buffer_;
22
23   MOJO_DISALLOW_COPY_AND_ASSIGN(AllocationScope);
24 };
25
26 }  // namespace mojo
27
28 #endif  // MOJO_PUBLIC_BINDINGS_ALLOCATION_SCOPE_H_