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 #include "ppapi/proxy/ppb_buffer_proxy.h" | 5 #include "ppapi/proxy/ppb_buffer_proxy.h" |
6 | 6 |
7 #include <vector> | 7 #include <vector> |
8 | 8 |
9 #include "base/logging.h" | 9 #include "base/logging.h" |
10 #include "build/build_config.h" | 10 #include "build/build_config.h" |
(...skipping 26 matching lines...) Expand all Loading... |
37 public PluginResource { | 37 public PluginResource { |
38 public: | 38 public: |
39 Buffer(const HostResource& resource, | 39 Buffer(const HostResource& resource, |
40 const base::SharedMemoryHandle& shm_handle, | 40 const base::SharedMemoryHandle& shm_handle, |
41 uint32_t size); | 41 uint32_t size); |
42 virtual ~Buffer(); | 42 virtual ~Buffer(); |
43 | 43 |
44 // Resource overrides. | 44 // Resource overrides. |
45 virtual Buffer* AsBuffer() OVERRIDE; | 45 virtual Buffer* AsBuffer() OVERRIDE; |
46 | 46 |
47 // ResourceObjectBase overries. | 47 // ResourceObjectBase overrides. |
48 virtual ppapi::thunk::PPB_Buffer_API* AsPPB_Buffer_API() OVERRIDE; | 48 virtual ppapi::thunk::PPB_Buffer_API* AsPPB_Buffer_API() OVERRIDE; |
49 | 49 |
50 // PPB_Buffer_API implementation. | 50 // PPB_Buffer_API implementation. |
51 virtual PP_Bool Describe(uint32_t* size_in_bytes) OVERRIDE; | 51 virtual PP_Bool Describe(uint32_t* size_in_bytes) OVERRIDE; |
52 virtual PP_Bool IsMapped() OVERRIDE; | 52 virtual PP_Bool IsMapped() OVERRIDE; |
53 virtual void* Map() OVERRIDE; | 53 virtual void* Map() OVERRIDE; |
54 virtual void Unmap() OVERRIDE; | 54 virtual void Unmap() OVERRIDE; |
55 | 55 |
56 private: | 56 private: |
57 base::SharedMemory shm_; | 57 base::SharedMemory shm_; |
(...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
185 #elif defined(OS_POSIX) | 185 #elif defined(OS_POSIX) |
186 local_fd; | 186 local_fd; |
187 #else | 187 #else |
188 #error Not implemented. | 188 #error Not implemented. |
189 #endif | 189 #endif |
190 *result_shm_handle = dispatcher->ShareHandleWithRemote(platform_file, false); | 190 *result_shm_handle = dispatcher->ShareHandleWithRemote(platform_file, false); |
191 } | 191 } |
192 | 192 |
193 } // namespace proxy | 193 } // namespace proxy |
194 } // namespace pp | 194 } // namespace pp |
OLD | NEW |