| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2010 The Native Client Authors. All rights reserved. | 2 * Copyright 2010 The Native Client Authors. All rights reserved. |
| 3 * Use of this source code is governed by a BSD-style license that can | 3 * Use of this source code is governed by a BSD-style license that can |
| 4 * be found in the LICENSE file. | 4 * be found in the LICENSE file. |
| 5 */ | 5 */ |
| 6 | 6 |
| 7 // A representation of a shared memory buffer abstraction. These are used | 7 // A representation of a shared memory buffer abstraction. These are used |
| 8 // to communicate between the renderer and the service runtime. | 8 // to communicate between the renderer and the service runtime. |
| 9 | 9 |
| 10 #ifndef NATIVE_CLIENT_SRC_TRUSTED_PLUGIN_SRPC_STREAM_SHM_BUFFER_H_ | 10 #ifndef NATIVE_CLIENT_SRC_TRUSTED_PLUGIN_STREAM_SHM_BUFFER_H_ |
| 11 #define NATIVE_CLIENT_SRC_TRUSTED_PLUGIN_SRPC_STREAM_SHM_BUFFER_H_ | 11 #define NATIVE_CLIENT_SRC_TRUSTED_PLUGIN_STREAM_SHM_BUFFER_H_ |
| 12 | 12 |
| 13 #include "native_client/src/include/nacl_macros.h" |
| 13 #include "native_client/src/include/portability.h" | 14 #include "native_client/src/include/portability.h" |
| 14 #include "native_client/src/include/nacl_macros.h" | |
| 15 | 15 |
| 16 struct NaClGioShmUnbounded; | 16 struct NaClGioShmUnbounded; |
| 17 struct NaClDesc; | 17 struct NaClDesc; |
| 18 | 18 |
| 19 namespace plugin { | 19 namespace plugin { |
| 20 | 20 |
| 21 class StreamShmBuffer { | 21 class StreamShmBuffer { |
| 22 public: | 22 public: |
| 23 StreamShmBuffer(); | 23 StreamShmBuffer(); |
| 24 ~StreamShmBuffer(); | 24 ~StreamShmBuffer(); |
| 25 int32_t read(int32_t offset, int32_t len, void* buf); | 25 int32_t read(int32_t offset, int32_t len, void* buf); |
| 26 int32_t write(int32_t offset, int32_t len, void* buf); | 26 int32_t write(int32_t offset, int32_t len, void* buf); |
| 27 NaClDesc* shm(int32_t* size) const; | 27 NaClDesc* shm(int32_t* size) const; |
| 28 | 28 |
| 29 private: | 29 private: |
| 30 NACL_DISALLOW_COPY_AND_ASSIGN(StreamShmBuffer); | 30 NACL_DISALLOW_COPY_AND_ASSIGN(StreamShmBuffer); |
| 31 NaClGioShmUnbounded* shmbufp_; | 31 NaClGioShmUnbounded* shmbufp_; |
| 32 }; | 32 }; |
| 33 | 33 |
| 34 } // namespace plugin | 34 } // namespace plugin |
| 35 | 35 |
| 36 #endif // NATIVE_CLIENT_SRC_TRUSTED_PLUGIN_SRPC_STREAM_SHM_BUFFER_H_ | 36 #endif // NATIVE_CLIENT_SRC_TRUSTED_PLUGIN_STREAM_SHM_BUFFER_H_ |
| OLD | NEW |