OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef MOJO_PUBLIC_BINDINGS_LIB_SCRATCH_BUFFER_H_ | 5 #ifndef MOJO_PUBLIC_BINDINGS_LIB_SCRATCH_BUFFER_H_ |
6 #define MOJO_PUBLIC_BINDINGS_LIB_SCRATCH_BUFFER_H_ | 6 #define MOJO_PUBLIC_BINDINGS_LIB_SCRATCH_BUFFER_H_ |
7 | 7 |
8 #include <deque> | 8 #include <deque> |
9 | 9 |
10 #include "mojo/public/bindings/buffer.h" | 10 #include "mojo/public/bindings/buffer.h" |
11 #include "mojo/public/system/macros.h" | 11 #include "mojo/public/c/system/macros.h" |
12 | 12 |
13 namespace mojo { | 13 namespace mojo { |
14 namespace internal { | 14 namespace internal { |
15 | 15 |
16 // The following class is designed to be allocated on the stack. If necessary, | 16 // The following class is designed to be allocated on the stack. If necessary, |
17 // it will failover to allocating objects on the heap. | 17 // it will failover to allocating objects on the heap. |
18 class ScratchBuffer : public Buffer { | 18 class ScratchBuffer : public Buffer { |
19 public: | 19 public: |
20 ScratchBuffer(); | 20 ScratchBuffer(); |
21 virtual ~ScratchBuffer(); | 21 virtual ~ScratchBuffer(); |
(...skipping 23 matching lines...) Expand all Loading... |
45 }; | 45 }; |
46 std::deque<PendingDestructor> pending_dtors_; | 46 std::deque<PendingDestructor> pending_dtors_; |
47 | 47 |
48 MOJO_DISALLOW_COPY_AND_ASSIGN(ScratchBuffer); | 48 MOJO_DISALLOW_COPY_AND_ASSIGN(ScratchBuffer); |
49 }; | 49 }; |
50 | 50 |
51 } // namespace internal | 51 } // namespace internal |
52 } // namespace mojo | 52 } // namespace mojo |
53 | 53 |
54 #endif // MOJO_PUBLIC_BINDINGS_LIB_SCRATCH_BUFFER_H_ | 54 #endif // MOJO_PUBLIC_BINDINGS_LIB_SCRATCH_BUFFER_H_ |
OLD | NEW |