Home | History | Annotate | Download | only in lib
      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_CPP_BINDINGS_LIB_FIXED_BUFFER_H_
      6 #define MOJO_PUBLIC_CPP_BINDINGS_LIB_FIXED_BUFFER_H_
      7 
      8 #include <cstddef>
      9 
     10 #include "base/component_export.h"
     11 #include "base/macros.h"
     12 #include "mojo/public/cpp/bindings/lib/buffer.h"
     13 
     14 namespace mojo {
     15 namespace internal {
     16 
     17 // FixedBufferForTesting owns its buffer. The Leak method may be used to steal
     18 // the underlying memory.
     19 class COMPONENT_EXPORT(MOJO_CPP_BINDINGS_BASE) FixedBufferForTesting
     20     : public Buffer {
     21  public:
     22   explicit FixedBufferForTesting(size_t size);
     23   ~FixedBufferForTesting();
     24 
     25  private:
     26   DISALLOW_COPY_AND_ASSIGN(FixedBufferForTesting);
     27 };
     28 
     29 }  // namespace internal
     30 }  // namespace mojo
     31 
     32 #endif  // MOJO_PUBLIC_CPP_BINDINGS_LIB_FIXED_BUFFER_H_
     33