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 WEBKIT_PLUGINS_PPAPI_PPB_BUFFER_IMPL_H_ | 5 #ifndef WEBKIT_PLUGINS_PPAPI_PPB_BUFFER_IMPL_H_ |
6 #define WEBKIT_PLUGINS_PPAPI_PPB_BUFFER_IMPL_H_ | 6 #define WEBKIT_PLUGINS_PPAPI_PPB_BUFFER_IMPL_H_ |
7 | 7 |
8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
9 #include "base/memory/scoped_ptr.h" | 9 #include "base/memory/scoped_ptr.h" |
10 #include "base/shared_memory.h" | 10 #include "base/shared_memory.h" |
(...skipping 14 matching lines...) Expand all Loading... |
25 public: | 25 public: |
26 virtual ~PPB_Buffer_Impl(); | 26 virtual ~PPB_Buffer_Impl(); |
27 | 27 |
28 static PP_Resource Create(PluginInstance* instance, uint32_t size); | 28 static PP_Resource Create(PluginInstance* instance, uint32_t size); |
29 | 29 |
30 virtual PPB_Buffer_Impl* AsPPB_Buffer_Impl(); | 30 virtual PPB_Buffer_Impl* AsPPB_Buffer_Impl(); |
31 | 31 |
32 base::SharedMemory* shared_memory() const { return shared_memory_.get(); } | 32 base::SharedMemory* shared_memory() const { return shared_memory_.get(); } |
33 uint32_t size() const { return size_; } | 33 uint32_t size() const { return size_; } |
34 | 34 |
35 // ResourceObjectBase overrides. | 35 // Resource overrides. |
36 virtual ::ppapi::thunk::PPB_Buffer_API* AsPPB_Buffer_API() OVERRIDE; | 36 virtual ::ppapi::thunk::PPB_Buffer_API* AsPPB_Buffer_API() OVERRIDE; |
37 virtual ::ppapi::thunk::PPB_BufferTrusted_API* AsPPB_BufferTrusted_API(); | 37 virtual ::ppapi::thunk::PPB_BufferTrusted_API* AsPPB_BufferTrusted_API(); |
38 | 38 |
39 // PPB_Buffer_API implementation. | 39 // PPB_Buffer_API implementation. |
40 virtual PP_Bool Describe(uint32_t* size_in_bytes) OVERRIDE; | 40 virtual PP_Bool Describe(uint32_t* size_in_bytes) OVERRIDE; |
41 virtual PP_Bool IsMapped() OVERRIDE; | 41 virtual PP_Bool IsMapped() OVERRIDE; |
42 virtual void* Map() OVERRIDE; | 42 virtual void* Map() OVERRIDE; |
43 virtual void Unmap() OVERRIDE; | 43 virtual void Unmap() OVERRIDE; |
44 | 44 |
45 // PPB_BufferTrusted_API implementation. | 45 // PPB_BufferTrusted_API implementation. |
(...skipping 29 matching lines...) Expand all Loading... |
75 void* data_; | 75 void* data_; |
76 uint32_t size_; | 76 uint32_t size_; |
77 | 77 |
78 DISALLOW_COPY_AND_ASSIGN(BufferAutoMapper); | 78 DISALLOW_COPY_AND_ASSIGN(BufferAutoMapper); |
79 }; | 79 }; |
80 | 80 |
81 } // namespace ppapi | 81 } // namespace ppapi |
82 } // namespace webkit | 82 } // namespace webkit |
83 | 83 |
84 #endif // WEBKIT_PLUGINS_PPAPI_PPB_BUFFER_IMPL_H_ | 84 #endif // WEBKIT_PLUGINS_PPAPI_PPB_BUFFER_IMPL_H_ |
OLD | NEW |