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_CPP_BINDINGS_ALLOCATION_SCOPE_H_ | 5 #ifndef MOJO_PUBLIC_CPP_BINDINGS_ALLOCATION_SCOPE_H_ |
6 #define MOJO_PUBLIC_CPP_BINDINGS_ALLOCATION_SCOPE_H_ | 6 #define MOJO_PUBLIC_CPP_BINDINGS_ALLOCATION_SCOPE_H_ |
7 | 7 |
8 #include "mojo/public/bindings/lib/scratch_buffer.h" | 8 #include "mojo/public/cpp/bindings/lib/scratch_buffer.h" |
9 #include "mojo/public/cpp/system/macros.h" | 9 #include "mojo/public/cpp/system/macros.h" |
10 | 10 |
11 namespace mojo { | 11 namespace mojo { |
12 | 12 |
13 // In order to allocate a Mojom-defined structure or mojo::Array<T> (including | 13 // In order to allocate a Mojom-defined structure or mojo::Array<T> (including |
14 // mojo::String), an AllocationScope must first be allocated. Typically, | 14 // mojo::String), an AllocationScope must first be allocated. Typically, |
15 // AllocationScope is placed on the stack before calls to build structs and | 15 // AllocationScope is placed on the stack before calls to build structs and |
16 // arrays. Such structs and arrays are valid so long as the corresponding | 16 // arrays. Such structs and arrays are valid so long as the corresponding |
17 // AllocationScope remains alive. | 17 // AllocationScope remains alive. |
18 // | 18 // |
(...skipping 15 matching lines...) Expand all Loading... |
34 | 34 |
35 private: | 35 private: |
36 internal::ScratchBuffer buffer_; | 36 internal::ScratchBuffer buffer_; |
37 | 37 |
38 MOJO_DISALLOW_COPY_AND_ASSIGN(AllocationScope); | 38 MOJO_DISALLOW_COPY_AND_ASSIGN(AllocationScope); |
39 }; | 39 }; |
40 | 40 |
41 } // namespace mojo | 41 } // namespace mojo |
42 | 42 |
43 #endif // MOJO_PUBLIC_CPP_BINDINGS_ALLOCATION_SCOPE_H_ | 43 #endif // MOJO_PUBLIC_CPP_BINDINGS_ALLOCATION_SCOPE_H_ |
OLD | NEW |