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 WEBKIT_PLUGINS_PPAPI_PPB_IMAGE_DATA_IMPL_H_ | 5 #ifndef CONTENT_RENDERER_PEPPER_PPB_IMAGE_DATA_IMPL_H_ |
6 #define WEBKIT_PLUGINS_PPAPI_PPB_IMAGE_DATA_IMPL_H_ | 6 #define CONTENT_RENDERER_PEPPER_PPB_IMAGE_DATA_IMPL_H_ |
7 | 7 |
8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
9 #include "base/memory/scoped_ptr.h" | 9 #include "base/memory/scoped_ptr.h" |
| 10 #include "content/common/content_export.h" |
| 11 #include "content/renderer/pepper/plugin_delegate.h" |
10 #include "ppapi/c/ppb_image_data.h" | 12 #include "ppapi/c/ppb_image_data.h" |
11 #include "ppapi/shared_impl/ppb_image_data_shared.h" | 13 #include "ppapi/shared_impl/ppb_image_data_shared.h" |
12 #include "ppapi/shared_impl/resource.h" | 14 #include "ppapi/shared_impl/resource.h" |
13 #include "ppapi/thunk/ppb_image_data_api.h" | 15 #include "ppapi/thunk/ppb_image_data_api.h" |
14 #include "third_party/skia/include/core/SkCanvas.h" | 16 #include "third_party/skia/include/core/SkCanvas.h" |
15 #include "webkit/plugins/ppapi/plugin_delegate.h" | |
16 #include "webkit/plugins/webkit_plugins_export.h" | |
17 | 17 |
18 class SkBitmap; | 18 class SkBitmap; |
19 class SkCanvas; | 19 class SkCanvas; |
20 | 20 |
21 namespace webkit { | 21 namespace webkit { |
22 namespace ppapi { | 22 namespace ppapi { |
23 | 23 |
24 class WEBKIT_PLUGINS_EXPORT PPB_ImageData_Impl | 24 class CONTENT_EXPORT PPB_ImageData_Impl |
25 : public ::ppapi::Resource, | 25 : public ::ppapi::Resource, |
26 public ::ppapi::PPB_ImageData_Shared, | 26 public ::ppapi::PPB_ImageData_Shared, |
27 public NON_EXPORTED_BASE(::ppapi::thunk::PPB_ImageData_API) { | 27 public NON_EXPORTED_BASE(::ppapi::thunk::PPB_ImageData_API) { |
28 public: | 28 public: |
29 // We delegate most of our implementation to a back-end class that either uses | 29 // We delegate most of our implementation to a back-end class that either uses |
30 // a PlatformCanvas (for most trusted stuff) or bare shared memory (for use by | 30 // a PlatformCanvas (for most trusted stuff) or bare shared memory (for use by |
31 // NaCl, or trusted plugins when the PlatformCanvas isn't needed). This makes | 31 // NaCl, or trusted plugins when the PlatformCanvas isn't needed). This makes |
32 // it cheap & easy to implement Swap. | 32 // it cheap & easy to implement Swap. |
33 class Backend { | 33 class Backend { |
34 public: | 34 public: |
(...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
186 PPB_ImageData_Impl* image_data_; | 186 PPB_ImageData_Impl* image_data_; |
187 bool is_valid_; | 187 bool is_valid_; |
188 bool needs_unmap_; | 188 bool needs_unmap_; |
189 | 189 |
190 DISALLOW_COPY_AND_ASSIGN(ImageDataAutoMapper); | 190 DISALLOW_COPY_AND_ASSIGN(ImageDataAutoMapper); |
191 }; | 191 }; |
192 | 192 |
193 } // namespace ppapi | 193 } // namespace ppapi |
194 } // namespace webkit | 194 } // namespace webkit |
195 | 195 |
196 #endif // WEBKIT_PLUGINS_PPAPI_PPB_IMAGE_DATA_IMPL_H_ | 196 #endif // CONTENT_RENDERER_PEPPER_PPB_IMAGE_DATA_IMPL_H_ |
OLD | NEW |