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" |
11 #include "base/compiler_specific.h" | 11 #include "base/compiler_specific.h" |
12 #include "base/memory/weak_ptr.h" | 12 #include "base/memory/weak_ptr.h" |
13 #include "content/common/content_export.h" | 13 #include "content/common/content_export.h" |
14 #include "ppapi/c/ppb_graphics_2d.h" | 14 #include "ppapi/c/ppb_graphics_2d.h" |
15 #include "ppapi/host/host_message_context.h" | 15 #include "ppapi/host/host_message_context.h" |
16 #include "ppapi/host/resource_host.h" | 16 #include "ppapi/host/resource_host.h" |
17 #include "third_party/WebKit/public/platform/WebCanvas.h" | 17 #include "third_party/WebKit/public/platform/WebCanvas.h" |
18 | 18 |
19 namespace cc { class TextureMailbox; } | 19 namespace cc { |
| 20 class ScopedReleaseCallback; |
| 21 class TextureMailbox; |
| 22 } |
20 | 23 |
21 namespace gfx { | 24 namespace gfx { |
22 class Point; | 25 class Point; |
23 class Rect; | 26 class Rect; |
24 } | 27 } |
25 | 28 |
26 namespace content { | 29 namespace content { |
27 | 30 |
28 class PepperPluginInstanceImpl; | 31 class PepperPluginInstanceImpl; |
29 class PPB_ImageData_Impl; | 32 class PPB_ImageData_Impl; |
(...skipping 22 matching lines...) Expand all Loading... |
52 // Assciates this device with the given plugin instance. You can pass NULL | 55 // Assciates this device with the given plugin instance. You can pass NULL |
53 // to clear the existing device. Returns true on success. In this case, a | 56 // to clear the existing device. Returns true on success. In this case, a |
54 // repaint of the page will also be scheduled. Failure means that the device | 57 // repaint of the page will also be scheduled. Failure means that the device |
55 // is already bound to a different instance, and nothing will happen. | 58 // is already bound to a different instance, and nothing will happen. |
56 bool BindToInstance(PepperPluginInstanceImpl* new_instance); | 59 bool BindToInstance(PepperPluginInstanceImpl* new_instance); |
57 // Paints the current backing store to the web page. | 60 // Paints the current backing store to the web page. |
58 void Paint(WebKit::WebCanvas* canvas, | 61 void Paint(WebKit::WebCanvas* canvas, |
59 const gfx::Rect& plugin_rect, | 62 const gfx::Rect& plugin_rect, |
60 const gfx::Rect& paint_rect); | 63 const gfx::Rect& paint_rect); |
61 | 64 |
62 bool PrepareTextureMailbox(cc::TextureMailbox* mailbox); | 65 bool PrepareTextureMailbox( |
| 66 cc::TextureMailbox* mailbox, |
| 67 scoped_ptr<cc::ScopedReleaseCallback>* release_callback); |
63 void AttachedToNewLayer(); | 68 void AttachedToNewLayer(); |
64 | 69 |
65 // Notifications about the view's progress painting. See PluginInstance. | 70 // Notifications about the view's progress painting. See PluginInstance. |
66 // These messages are used to send Flush callbacks to the plugin. | 71 // These messages are used to send Flush callbacks to the plugin. |
67 void ViewWillInitiatePaint(); | 72 void ViewWillInitiatePaint(); |
68 void ViewInitiatedPaint(); | 73 void ViewInitiatedPaint(); |
69 void ViewFlushedPaint(); | 74 void ViewFlushedPaint(); |
70 | 75 |
71 void SetScale(float scale); | 76 void SetScale(float scale); |
72 float GetScale() const; | 77 float GetScale() const; |
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
176 | 181 |
177 bool texture_mailbox_modified_; | 182 bool texture_mailbox_modified_; |
178 | 183 |
179 friend class PepperGraphics2DHostTest; | 184 friend class PepperGraphics2DHostTest; |
180 DISALLOW_COPY_AND_ASSIGN(PepperGraphics2DHost); | 185 DISALLOW_COPY_AND_ASSIGN(PepperGraphics2DHost); |
181 }; | 186 }; |
182 | 187 |
183 } // namespace content | 188 } // namespace content |
184 | 189 |
185 #endif // CONTENT_RENDERER_PEPPER_PEPPER_GRAPHICS_2D_HOST_H_ | 190 #endif // CONTENT_RENDERER_PEPPER_PEPPER_GRAPHICS_2D_HOST_H_ |
OLD | NEW |