| 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> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include <memory> |
| 11 |
| 10 #include "base/macros.h" | 12 #include "base/macros.h" |
| 11 #include "base/memory/scoped_ptr.h" | |
| 12 #include "base/memory/shared_memory.h" | 13 #include "base/memory/shared_memory.h" |
| 13 #include "build/build_config.h" | 14 #include "build/build_config.h" |
| 14 #include "ipc/ipc_platform_file.h" | 15 #include "ipc/ipc_platform_file.h" |
| 15 #include "ppapi/c/pp_bool.h" | 16 #include "ppapi/c/pp_bool.h" |
| 16 #include "ppapi/c/pp_completion_callback.h" | 17 #include "ppapi/c/pp_completion_callback.h" |
| 17 #include "ppapi/c/pp_instance.h" | 18 #include "ppapi/c/pp_instance.h" |
| 18 #include "ppapi/c/pp_module.h" | 19 #include "ppapi/c/pp_module.h" |
| 19 #include "ppapi/c/pp_resource.h" | 20 #include "ppapi/c/pp_resource.h" |
| 20 #include "ppapi/c/pp_size.h" | 21 #include "ppapi/c/pp_size.h" |
| 21 #include "ppapi/c/pp_var.h" | 22 #include "ppapi/c/pp_var.h" |
| (...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 93 | 94 |
| 94 // PPB_ImageData API. | 95 // PPB_ImageData API. |
| 95 void* Map() override; | 96 void* Map() override; |
| 96 void Unmap() override; | 97 void Unmap() override; |
| 97 SkCanvas* GetPlatformCanvas() override; | 98 SkCanvas* GetPlatformCanvas() override; |
| 98 SkCanvas* GetCanvas() override; | 99 SkCanvas* GetCanvas() override; |
| 99 | 100 |
| 100 static ImageHandle NullHandle(); | 101 static ImageHandle NullHandle(); |
| 101 | 102 |
| 102 private: | 103 private: |
| 103 scoped_ptr<TransportDIB> transport_dib_; | 104 std::unique_ptr<TransportDIB> transport_dib_; |
| 104 | 105 |
| 105 // Null when the image isn't mapped. | 106 // Null when the image isn't mapped. |
| 106 skia::RefPtr<SkCanvas> mapped_canvas_; | 107 skia::RefPtr<SkCanvas> mapped_canvas_; |
| 107 | 108 |
| 108 DISALLOW_COPY_AND_ASSIGN(PlatformImageData); | 109 DISALLOW_COPY_AND_ASSIGN(PlatformImageData); |
| 109 }; | 110 }; |
| 110 #endif // !defined(OS_NACL) | 111 #endif // !defined(OS_NACL) |
| 111 | 112 |
| 112 // SimpleImageData is a simple, platform-independent image data resource which | 113 // SimpleImageData is a simple, platform-independent image data resource which |
| 113 // can be used by NaCl. It can also be used by trusted apps when access to the | 114 // can be used by NaCl. It can also be used by trusted apps when access to the |
| (...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 190 // Host->Plugin message handlers. | 191 // Host->Plugin message handlers. |
| 191 void OnPluginMsgNotifyUnusedImageData(const HostResource& old_image_data); | 192 void OnPluginMsgNotifyUnusedImageData(const HostResource& old_image_data); |
| 192 | 193 |
| 193 DISALLOW_COPY_AND_ASSIGN(PPB_ImageData_Proxy); | 194 DISALLOW_COPY_AND_ASSIGN(PPB_ImageData_Proxy); |
| 194 }; | 195 }; |
| 195 | 196 |
| 196 } // namespace proxy | 197 } // namespace proxy |
| 197 } // namespace ppapi | 198 } // namespace ppapi |
| 198 | 199 |
| 199 #endif // PPAPI_PPB_IMAGE_DATA_PROXY_H_ | 200 #endif // PPAPI_PPB_IMAGE_DATA_PROXY_H_ |
| OLD | NEW |