| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 PPAPI_PROXY_PPB_BUFFER_PROXY_H_ | 5 #ifndef PPAPI_PROXY_PPB_BUFFER_PROXY_H_ |
| 6 #define PPAPI_PROXY_PPB_BUFFER_PROXY_H_ | 6 #define PPAPI_PROXY_PPB_BUFFER_PROXY_H_ |
| 7 | 7 |
| 8 #include "base/shared_memory.h" | 8 #include "base/shared_memory.h" |
| 9 #include "ppapi/c/pp_instance.h" | 9 #include "ppapi/c/pp_instance.h" |
| 10 #include "ppapi/proxy/interface_proxy.h" | 10 #include "ppapi/proxy/interface_proxy.h" |
| (...skipping 18 matching lines...) Expand all Loading... |
| 29 | 29 |
| 30 // PPB_Buffer_API implementation. | 30 // PPB_Buffer_API implementation. |
| 31 virtual PP_Bool Describe(uint32_t* size_in_bytes) OVERRIDE; | 31 virtual PP_Bool Describe(uint32_t* size_in_bytes) OVERRIDE; |
| 32 virtual PP_Bool IsMapped() OVERRIDE; | 32 virtual PP_Bool IsMapped() OVERRIDE; |
| 33 virtual void* Map() OVERRIDE; | 33 virtual void* Map() OVERRIDE; |
| 34 virtual void Unmap() OVERRIDE; | 34 virtual void Unmap() OVERRIDE; |
| 35 | 35 |
| 36 private: | 36 private: |
| 37 base::SharedMemory shm_; | 37 base::SharedMemory shm_; |
| 38 uint32_t size_; | 38 uint32_t size_; |
| 39 void* mapped_data_; | |
| 40 int map_count_; | 39 int map_count_; |
| 41 | 40 |
| 42 DISALLOW_COPY_AND_ASSIGN(Buffer); | 41 DISALLOW_COPY_AND_ASSIGN(Buffer); |
| 43 }; | 42 }; |
| 44 | 43 |
| 45 class PPB_Buffer_Proxy : public InterfaceProxy { | 44 class PPB_Buffer_Proxy : public InterfaceProxy { |
| 46 public: | 45 public: |
| 47 explicit PPB_Buffer_Proxy(Dispatcher* dispatcher); | 46 explicit PPB_Buffer_Proxy(Dispatcher* dispatcher); |
| 48 virtual ~PPB_Buffer_Proxy(); | 47 virtual ~PPB_Buffer_Proxy(); |
| 49 | 48 |
| (...skipping 13 matching lines...) Expand all Loading... |
| 63 void OnMsgCreate(PP_Instance instance, | 62 void OnMsgCreate(PP_Instance instance, |
| 64 uint32_t size, | 63 uint32_t size, |
| 65 HostResource* result_resource, | 64 HostResource* result_resource, |
| 66 base::SharedMemoryHandle* result_shm_handle); | 65 base::SharedMemoryHandle* result_shm_handle); |
| 67 }; | 66 }; |
| 68 | 67 |
| 69 } // namespace proxy | 68 } // namespace proxy |
| 70 } // namespace ppapi | 69 } // namespace ppapi |
| 71 | 70 |
| 72 #endif // PPAPI_PROXY_PPB_BUFFER_PROXY_H_ | 71 #endif // PPAPI_PROXY_PPB_BUFFER_PROXY_H_ |
| OLD | NEW |