| 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 <stdint.h> |
| 9 |
| 10 #include "base/macros.h" |
| 8 #include "base/memory/scoped_ptr.h" | 11 #include "base/memory/scoped_ptr.h" |
| 9 #include "base/memory/shared_memory.h" | 12 #include "base/memory/shared_memory.h" |
| 10 #include "build/build_config.h" | 13 #include "build/build_config.h" |
| 11 #include "ipc/ipc_platform_file.h" | 14 #include "ipc/ipc_platform_file.h" |
| 12 #include "ppapi/c/pp_bool.h" | 15 #include "ppapi/c/pp_bool.h" |
| 13 #include "ppapi/c/pp_completion_callback.h" | 16 #include "ppapi/c/pp_completion_callback.h" |
| 14 #include "ppapi/c/pp_instance.h" | 17 #include "ppapi/c/pp_instance.h" |
| 15 #include "ppapi/c/pp_module.h" | 18 #include "ppapi/c/pp_module.h" |
| 16 #include "ppapi/c/pp_resource.h" | 19 #include "ppapi/c/pp_resource.h" |
| 17 #include "ppapi/c/pp_size.h" | 20 #include "ppapi/c/pp_size.h" |
| (...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 114 ~SimpleImageData() override; | 117 ~SimpleImageData() override; |
| 115 | 118 |
| 116 // PPB_ImageData API. | 119 // PPB_ImageData API. |
| 117 void* Map() override; | 120 void* Map() override; |
| 118 void Unmap() override; | 121 void Unmap() override; |
| 119 SkCanvas* GetPlatformCanvas() override; | 122 SkCanvas* GetPlatformCanvas() override; |
| 120 SkCanvas* GetCanvas() override; | 123 SkCanvas* GetCanvas() override; |
| 121 | 124 |
| 122 private: | 125 private: |
| 123 base::SharedMemory shm_; | 126 base::SharedMemory shm_; |
| 124 uint32 size_; | 127 uint32_t size_; |
| 125 int map_count_; | 128 int map_count_; |
| 126 | 129 |
| 127 DISALLOW_COPY_AND_ASSIGN(SimpleImageData); | 130 DISALLOW_COPY_AND_ASSIGN(SimpleImageData); |
| 128 }; | 131 }; |
| 129 | 132 |
| 130 class PPB_ImageData_Proxy : public InterfaceProxy { | 133 class PPB_ImageData_Proxy : public InterfaceProxy { |
| 131 public: | 134 public: |
| 132 PPB_ImageData_Proxy(Dispatcher* dispatcher); | 135 PPB_ImageData_Proxy(Dispatcher* dispatcher); |
| 133 ~PPB_ImageData_Proxy() override; | 136 ~PPB_ImageData_Proxy() override; |
| 134 | 137 |
| (...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 184 // Host->Plugin message handlers. | 187 // Host->Plugin message handlers. |
| 185 void OnPluginMsgNotifyUnusedImageData(const HostResource& old_image_data); | 188 void OnPluginMsgNotifyUnusedImageData(const HostResource& old_image_data); |
| 186 | 189 |
| 187 DISALLOW_COPY_AND_ASSIGN(PPB_ImageData_Proxy); | 190 DISALLOW_COPY_AND_ASSIGN(PPB_ImageData_Proxy); |
| 188 }; | 191 }; |
| 189 | 192 |
| 190 } // namespace proxy | 193 } // namespace proxy |
| 191 } // namespace ppapi | 194 } // namespace ppapi |
| 192 | 195 |
| 193 #endif // PPAPI_PPB_IMAGE_DATA_PROXY_H_ | 196 #endif // PPAPI_PPB_IMAGE_DATA_PROXY_H_ |
| OLD | NEW |