| 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_GRAPHICS_2D_IMPL_H_ | 5 #ifndef WEBKIT_PLUGINS_PPAPI_PPB_GRAPHICS_2D_IMPL_H_ |
| 6 #define WEBKIT_PLUGINS_PPAPI_PPB_GRAPHICS_2D_IMPL_H_ | 6 #define WEBKIT_PLUGINS_PPAPI_PPB_GRAPHICS_2D_IMPL_H_ |
| 7 | 7 |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
| 11 #include "base/memory/weak_ptr.h" | 11 #include "base/memory/weak_ptr.h" |
| 12 #include "ppapi/c/pp_completion_callback.h" | 12 #include "ppapi/c/pp_completion_callback.h" |
| 13 #include "ppapi/c/ppb_graphics_2d.h" | 13 #include "ppapi/c/ppb_graphics_2d.h" |
| 14 #include "ppapi/shared_impl/resource.h" | 14 #include "ppapi/shared_impl/resource.h" |
| 15 #include "ppapi/shared_impl/tracked_callback.h" | 15 #include "ppapi/shared_impl/tracked_callback.h" |
| 16 #include "ppapi/thunk/ppb_graphics_2d_api.h" | 16 #include "ppapi/thunk/ppb_graphics_2d_api.h" |
| 17 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebCanvas.h" | 17 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebCanvas.h" |
| 18 #include "webkit/plugins/webkit_plugins_export.h" | 18 #include "webkit/plugins/webkit_plugins_export.h" |
| 19 | 19 |
| 20 namespace gfx { | 20 namespace gfx { |
| 21 class Point; | 21 class Point; |
| 22 class Rect; | 22 class Rect; |
| 23 } | 23 } |
| 24 | 24 |
| 25 namespace content { |
| 26 class PepperGraphics2DHost; |
| 27 } |
| 28 |
| 25 namespace webkit { | 29 namespace webkit { |
| 26 namespace ppapi { | 30 namespace ppapi { |
| 27 | 31 |
| 28 class PPB_ImageData_Impl; | 32 class PPB_ImageData_Impl; |
| 29 class PluginInstance; | 33 class PluginInstance; |
| 30 | 34 |
| 31 class PPB_Graphics2D_Impl : public ::ppapi::Resource, | 35 class PPB_Graphics2D_Impl : public ::ppapi::Resource, |
| 32 public ::ppapi::thunk::PPB_Graphics2D_API { | 36 public ::ppapi::thunk::PPB_Graphics2D_API { |
| 33 public: | 37 public: |
| 34 virtual ~PPB_Graphics2D_Impl(); | 38 virtual ~PPB_Graphics2D_Impl(); |
| (...skipping 164 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 199 // Set to true if the plugin declares that this device will always be opaque. | 203 // Set to true if the plugin declares that this device will always be opaque. |
| 200 // This allows us to do more optimized painting in some cases. | 204 // This allows us to do more optimized painting in some cases. |
| 201 bool is_always_opaque_; | 205 bool is_always_opaque_; |
| 202 | 206 |
| 203 // Set to the scale between what the plugin considers to be one pixel and one | 207 // Set to the scale between what the plugin considers to be one pixel and one |
| 204 // DIP | 208 // DIP |
| 205 float scale_; | 209 float scale_; |
| 206 | 210 |
| 207 base::WeakPtrFactory<PPB_Graphics2D_Impl> weak_ptr_factory_; | 211 base::WeakPtrFactory<PPB_Graphics2D_Impl> weak_ptr_factory_; |
| 208 | 212 |
| 213 friend class content::PepperGraphics2DHost; |
| 209 DISALLOW_COPY_AND_ASSIGN(PPB_Graphics2D_Impl); | 214 DISALLOW_COPY_AND_ASSIGN(PPB_Graphics2D_Impl); |
| 210 }; | 215 }; |
| 211 | 216 |
| 212 } // namespace ppapi | 217 } // namespace ppapi |
| 213 } // namespace webkit | 218 } // namespace webkit |
| 214 | 219 |
| 215 #endif // WEBKIT_PLUGINS_PPAPI_PPB_GRAPHICS_2D_IMPL_H_ | 220 #endif // WEBKIT_PLUGINS_PPAPI_PPB_GRAPHICS_2D_IMPL_H_ |
| OLD | NEW |