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_PPB_IMAGE_DATA_PROXY_H_ | 5 #ifndef PPAPI_PPB_IMAGE_DATA_PROXY_H_ |
6 #define PPAPI_PPB_IMAGE_DATA_PROXY_H_ | 6 #define PPAPI_PPB_IMAGE_DATA_PROXY_H_ |
7 | 7 |
8 #include "base/memory/scoped_ptr.h" | 8 #include "base/memory/scoped_ptr.h" |
9 #include "base/memory/shared_memory.h" | 9 #include "base/memory/shared_memory.h" |
10 #include "build/build_config.h" | 10 #include "build/build_config.h" |
(...skipping 30 matching lines...) Expand all Loading... |
41 public: | 41 public: |
42 ~ImageData() override; | 42 ~ImageData() override; |
43 | 43 |
44 // Resource overrides. | 44 // Resource overrides. |
45 ppapi::thunk::PPB_ImageData_API* AsPPB_ImageData_API() override; | 45 ppapi::thunk::PPB_ImageData_API* AsPPB_ImageData_API() override; |
46 void LastPluginRefWasDeleted() override; | 46 void LastPluginRefWasDeleted() override; |
47 void InstanceWasDeleted() override; | 47 void InstanceWasDeleted() override; |
48 | 48 |
49 // PPB_ImageData API. | 49 // PPB_ImageData API. |
50 PP_Bool Describe(PP_ImageDataDesc* desc) override; | 50 PP_Bool Describe(PP_ImageDataDesc* desc) override; |
51 int32_t GetSharedMemory(base::SharedMemoryHandle* handle, | 51 int32_t GetSharedMemory(base::SharedMemory** shm, |
52 uint32_t* byte_count) override; | 52 uint32_t* byte_count) override; |
53 void SetIsCandidateForReuse() override; | 53 void SetIsCandidateForReuse() override; |
54 | 54 |
55 PPB_ImageData_Shared::ImageDataType type() const { return type_; } | 55 PPB_ImageData_Shared::ImageDataType type() const { return type_; } |
56 const PP_ImageDataDesc& desc() const { return desc_; } | 56 const PP_ImageDataDesc& desc() const { return desc_; } |
57 | 57 |
58 // Prepares this image data to be recycled to the plugin. Clears the contents | 58 // Prepares this image data to be recycled to the plugin. Clears the contents |
59 // if zero_contents is true. | 59 // if zero_contents is true. |
60 void RecycleToPlugin(bool zero_contents); | 60 void RecycleToPlugin(bool zero_contents); |
61 | 61 |
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
184 // Host->Plugin message handlers. | 184 // Host->Plugin message handlers. |
185 void OnPluginMsgNotifyUnusedImageData(const HostResource& old_image_data); | 185 void OnPluginMsgNotifyUnusedImageData(const HostResource& old_image_data); |
186 | 186 |
187 DISALLOW_COPY_AND_ASSIGN(PPB_ImageData_Proxy); | 187 DISALLOW_COPY_AND_ASSIGN(PPB_ImageData_Proxy); |
188 }; | 188 }; |
189 | 189 |
190 } // namespace proxy | 190 } // namespace proxy |
191 } // namespace ppapi | 191 } // namespace ppapi |
192 | 192 |
193 #endif // PPAPI_PPB_IMAGE_DATA_PROXY_H_ | 193 #endif // PPAPI_PPB_IMAGE_DATA_PROXY_H_ |
OLD | NEW |