OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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_GLUE_PLUGINS_PEPPER_PLUGIN_INSTANCE_H_ | 5 #ifndef WEBKIT_GLUE_PLUGINS_PEPPER_PLUGIN_INSTANCE_H_ |
6 #define WEBKIT_GLUE_PLUGINS_PEPPER_PLUGIN_INSTANCE_H_ | 6 #define WEBKIT_GLUE_PLUGINS_PEPPER_PLUGIN_INSTANCE_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
93 void Paint(WebKit::WebCanvas* canvas, | 93 void Paint(WebKit::WebCanvas* canvas, |
94 const gfx::Rect& plugin_rect, | 94 const gfx::Rect& plugin_rect, |
95 const gfx::Rect& paint_rect); | 95 const gfx::Rect& paint_rect); |
96 | 96 |
97 // Schedules a paint of the page for the given region. The coordinates are | 97 // Schedules a paint of the page for the given region. The coordinates are |
98 // relative to the top-left of the plugin. This does nothing if the plugin | 98 // relative to the top-left of the plugin. This does nothing if the plugin |
99 // has not yet been positioned. You can supply an empty gfx::Rect() to | 99 // has not yet been positioned. You can supply an empty gfx::Rect() to |
100 // invalidate the entire plugin. | 100 // invalidate the entire plugin. |
101 void InvalidateRect(const gfx::Rect& rect); | 101 void InvalidateRect(const gfx::Rect& rect); |
102 | 102 |
| 103 // Schedules a scroll of the plugin. This uses optimized scrolling only for |
| 104 // full-frame plugins, as otherwise there could be other elements on top. The |
| 105 // slow path can also be triggered if there is an overlapping frame. |
| 106 void ScrollRect(int dx, int dy, const gfx::Rect& rect); |
| 107 |
103 // PPB_Instance implementation. | 108 // PPB_Instance implementation. |
104 PP_Var GetWindowObject(); | 109 PP_Var GetWindowObject(); |
105 PP_Var GetOwnerElementObject(); | 110 PP_Var GetOwnerElementObject(); |
106 bool BindGraphics(PP_Resource device_id); | 111 bool BindGraphics(PP_Resource device_id); |
107 bool full_frame() const { return full_frame_; } | 112 bool full_frame() const { return full_frame_; } |
108 bool SetCursor(PP_CursorType_Dev type); | 113 bool SetCursor(PP_CursorType_Dev type); |
109 PP_Var ExecuteScript(PP_Var script, PP_Var* exception); | 114 PP_Var ExecuteScript(PP_Var script, PP_Var* exception); |
110 | 115 |
111 // PPP_Instance pass-through. | 116 // PPP_Instance pass-through. |
112 void Delete(); | 117 void Delete(); |
(...skipping 155 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
268 | 273 |
269 // Plugin container for fullscreen mode. NULL if not in fullscreen mode. | 274 // Plugin container for fullscreen mode. NULL if not in fullscreen mode. |
270 FullscreenContainer* fullscreen_container_; | 275 FullscreenContainer* fullscreen_container_; |
271 | 276 |
272 DISALLOW_COPY_AND_ASSIGN(PluginInstance); | 277 DISALLOW_COPY_AND_ASSIGN(PluginInstance); |
273 }; | 278 }; |
274 | 279 |
275 } // namespace pepper | 280 } // namespace pepper |
276 | 281 |
277 #endif // WEBKIT_GLUE_PLUGINS_PEPPER_PLUGIN_INSTANCE_H_ | 282 #endif // WEBKIT_GLUE_PLUGINS_PEPPER_PLUGIN_INSTANCE_H_ |
OLD | NEW |