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 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/scoped_ptr.h" | 8 #include "base/scoped_ptr.h" |
9 #include "ppapi/c/pp_bool.h" | 9 #include "ppapi/c/pp_bool.h" |
10 #include "ppapi/c/pp_completion_callback.h" | 10 #include "ppapi/c/pp_completion_callback.h" |
(...skipping 14 matching lines...) Expand all Loading... |
25 namespace skia { | 25 namespace skia { |
26 class PlatformCanvas; | 26 class PlatformCanvas; |
27 } | 27 } |
28 | 28 |
29 namespace ppapi { | 29 namespace ppapi { |
30 | 30 |
31 class HostResource; | 31 class HostResource; |
32 | 32 |
33 namespace proxy { | 33 namespace proxy { |
34 | 34 |
| 35 class PPB_ImageData_Proxy : public InterfaceProxy { |
| 36 public: |
| 37 PPB_ImageData_Proxy(Dispatcher* dispatcher, const void* target_interface); |
| 38 virtual ~PPB_ImageData_Proxy(); |
| 39 |
| 40 static const Info* GetInfo(); |
| 41 |
| 42 const PPB_ImageData* ppb_image_data_target() const { |
| 43 return static_cast<const PPB_ImageData*>(target_interface()); |
| 44 } |
| 45 |
| 46 // InterfaceProxy implementation. |
| 47 virtual bool OnMessageReceived(const IPC::Message& msg); |
| 48 }; |
| 49 |
35 class ImageData : public ppapi::Resource, | 50 class ImageData : public ppapi::Resource, |
36 public ppapi::thunk::PPB_ImageData_API, | 51 public ppapi::thunk::PPB_ImageData_API, |
37 public ppapi::ImageDataImpl { | 52 public ppapi::ImageDataImpl { |
38 public: | 53 public: |
39 ImageData(const ppapi::HostResource& resource, | 54 ImageData(const ppapi::HostResource& resource, |
40 const PP_ImageDataDesc& desc, | 55 const PP_ImageDataDesc& desc, |
41 ImageHandle handle); | 56 ImageHandle handle); |
42 virtual ~ImageData(); | 57 virtual ~ImageData(); |
43 | 58 |
44 // Resource overrides. | 59 // Resource overrides. |
(...skipping 20 matching lines...) Expand all Loading... |
65 // Null when the image isn't mapped. | 80 // Null when the image isn't mapped. |
66 scoped_ptr<skia::PlatformCanvas> mapped_canvas_; | 81 scoped_ptr<skia::PlatformCanvas> mapped_canvas_; |
67 | 82 |
68 DISALLOW_COPY_AND_ASSIGN(ImageData); | 83 DISALLOW_COPY_AND_ASSIGN(ImageData); |
69 }; | 84 }; |
70 | 85 |
71 } // namespace proxy | 86 } // namespace proxy |
72 } // namespace ppapi | 87 } // namespace ppapi |
73 | 88 |
74 #endif // PPAPI_PPB_IMAGE_DATA_PROXY_H_ | 89 #endif // PPAPI_PPB_IMAGE_DATA_PROXY_H_ |
OLD | NEW |