OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/memory/shared_memory.h" | 8 #include "base/memory/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 // Resource overrides. | 29 // Resource overrides. |
30 thunk::PPB_Buffer_API* AsPPB_Buffer_API() override; | 30 thunk::PPB_Buffer_API* AsPPB_Buffer_API() override; |
31 | 31 |
32 // PPB_Buffer_API implementation. | 32 // PPB_Buffer_API implementation. |
33 PP_Bool Describe(uint32_t* size_in_bytes) override; | 33 PP_Bool Describe(uint32_t* size_in_bytes) override; |
34 PP_Bool IsMapped() override; | 34 PP_Bool IsMapped() override; |
35 void* Map() override; | 35 void* Map() override; |
36 void Unmap() override; | 36 void Unmap() override; |
37 | 37 |
38 // Trusted | 38 // Trusted |
39 int32_t GetSharedMemory(int* handle) override; | 39 int32_t GetSharedMemory(base::SharedMemory** shm) override; |
40 | 40 |
41 private: | 41 private: |
42 base::SharedMemory shm_; | 42 base::SharedMemory shm_; |
43 uint32_t size_; | 43 uint32_t size_; |
44 int map_count_; | 44 int map_count_; |
45 | 45 |
46 DISALLOW_COPY_AND_ASSIGN(Buffer); | 46 DISALLOW_COPY_AND_ASSIGN(Buffer); |
47 }; | 47 }; |
48 | 48 |
49 class PPB_Buffer_Proxy : public InterfaceProxy { | 49 class PPB_Buffer_Proxy : public InterfaceProxy { |
(...skipping 17 matching lines...) Expand all Loading... |
67 void OnMsgCreate(PP_Instance instance, | 67 void OnMsgCreate(PP_Instance instance, |
68 uint32_t size, | 68 uint32_t size, |
69 HostResource* result_resource, | 69 HostResource* result_resource, |
70 ppapi::proxy::SerializedHandle* result_shm_handle); | 70 ppapi::proxy::SerializedHandle* result_shm_handle); |
71 }; | 71 }; |
72 | 72 |
73 } // namespace proxy | 73 } // namespace proxy |
74 } // namespace ppapi | 74 } // namespace ppapi |
75 | 75 |
76 #endif // PPAPI_PROXY_PPB_BUFFER_PROXY_H_ | 76 #endif // PPAPI_PROXY_PPB_BUFFER_PROXY_H_ |
OLD | NEW |