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 | |
50 class ImageData : public ppapi::Resource, | 35 class ImageData : public ppapi::Resource, |
51 public ppapi::thunk::PPB_ImageData_API, | 36 public ppapi::thunk::PPB_ImageData_API, |
52 public ppapi::ImageDataImpl { | 37 public ppapi::ImageDataImpl { |
53 public: | 38 public: |
54 ImageData(const ppapi::HostResource& resource, | 39 ImageData(const ppapi::HostResource& resource, |
55 const PP_ImageDataDesc& desc, | 40 const PP_ImageDataDesc& desc, |
56 ImageHandle handle); | 41 ImageHandle handle); |
57 virtual ~ImageData(); | 42 virtual ~ImageData(); |
58 | 43 |
59 // Resource overrides. | 44 // Resource overrides. |
(...skipping 20 matching lines...) Expand all Loading... |
80 // Null when the image isn't mapped. | 65 // Null when the image isn't mapped. |
81 scoped_ptr<skia::PlatformCanvas> mapped_canvas_; | 66 scoped_ptr<skia::PlatformCanvas> mapped_canvas_; |
82 | 67 |
83 DISALLOW_COPY_AND_ASSIGN(ImageData); | 68 DISALLOW_COPY_AND_ASSIGN(ImageData); |
84 }; | 69 }; |
85 | 70 |
86 } // namespace proxy | 71 } // namespace proxy |
87 } // namespace ppapi | 72 } // namespace ppapi |
88 | 73 |
89 #endif // PPAPI_PPB_IMAGE_DATA_PROXY_H_ | 74 #endif // PPAPI_PPB_IMAGE_DATA_PROXY_H_ |
OLD | NEW |