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 CONTENT_RENDERER_PEPPER_PEPPER_GRAPHICS_2D_HOST_H_ | 5 #ifndef CONTENT_RENDERER_PEPPER_PEPPER_GRAPHICS_2D_HOST_H_ |
6 #define CONTENT_RENDERER_PEPPER_PEPPER_GRAPHICS_2D_HOST_H_ | 6 #define CONTENT_RENDERER_PEPPER_PEPPER_GRAPHICS_2D_HOST_H_ |
7 | 7 |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
49 PP_Resource resource, | 49 PP_Resource resource, |
50 const PP_Size& size, | 50 const PP_Size& size, |
51 PP_Bool is_always_opaque, | 51 PP_Bool is_always_opaque, |
52 scoped_refptr<PPB_ImageData_Impl> backing_store); | 52 scoped_refptr<PPB_ImageData_Impl> backing_store); |
53 | 53 |
54 virtual ~PepperGraphics2DHost(); | 54 virtual ~PepperGraphics2DHost(); |
55 | 55 |
56 // ppapi::host::ResourceHost override. | 56 // ppapi::host::ResourceHost override. |
57 virtual int32_t OnResourceMessageReceived( | 57 virtual int32_t OnResourceMessageReceived( |
58 const IPC::Message& msg, | 58 const IPC::Message& msg, |
59 ppapi::host::HostMessageContext* context) OVERRIDE; | 59 ppapi::host::HostMessageContext* context) override; |
60 virtual bool IsGraphics2DHost() OVERRIDE; | 60 virtual bool IsGraphics2DHost() override; |
61 | 61 |
62 bool ReadImageData(PP_Resource image, const PP_Point* top_left); | 62 bool ReadImageData(PP_Resource image, const PP_Point* top_left); |
63 // Assciates this device with the given plugin instance. You can pass NULL | 63 // Assciates this device with the given plugin instance. You can pass NULL |
64 // to clear the existing device. Returns true on success. In this case, a | 64 // to clear the existing device. Returns true on success. In this case, a |
65 // repaint of the page will also be scheduled. Failure means that the device | 65 // repaint of the page will also be scheduled. Failure means that the device |
66 // is already bound to a different instance, and nothing will happen. | 66 // is already bound to a different instance, and nothing will happen. |
67 bool BindToInstance(PepperPluginInstanceImpl* new_instance); | 67 bool BindToInstance(PepperPluginInstanceImpl* new_instance); |
68 // Paints the current backing store to the web page. | 68 // Paints the current backing store to the web page. |
69 void Paint(blink::WebCanvas* canvas, | 69 void Paint(blink::WebCanvas* canvas, |
70 const gfx::Rect& plugin_rect, | 70 const gfx::Rect& plugin_rect, |
(...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
206 scoped_ptr<cc::SharedBitmap> cached_bitmap_; | 206 scoped_ptr<cc::SharedBitmap> cached_bitmap_; |
207 gfx::Size cached_bitmap_size_; | 207 gfx::Size cached_bitmap_size_; |
208 | 208 |
209 friend class PepperGraphics2DHostTest; | 209 friend class PepperGraphics2DHostTest; |
210 DISALLOW_COPY_AND_ASSIGN(PepperGraphics2DHost); | 210 DISALLOW_COPY_AND_ASSIGN(PepperGraphics2DHost); |
211 }; | 211 }; |
212 | 212 |
213 } // namespace content | 213 } // namespace content |
214 | 214 |
215 #endif // CONTENT_RENDERER_PEPPER_PEPPER_GRAPHICS_2D_HOST_H_ | 215 #endif // CONTENT_RENDERER_PEPPER_PEPPER_GRAPHICS_2D_HOST_H_ |
OLD | NEW |