Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(116)

Unified Diff: ppapi/thunk/ppb_widget_thunk.cc

Issue 10824386: Add SetScale to PPB_WidgetDev, use scale for painting (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ppapi/thunk/ppb_widget_api.h ('k') | webkit/plugins/ppapi/ppb_scrollbar_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ppapi/thunk/ppb_widget_thunk.cc
diff --git a/ppapi/thunk/ppb_widget_thunk.cc b/ppapi/thunk/ppb_widget_thunk.cc
index 94833ebc2868e8e9137e566318b0c3149c44e3dd..f00b48b3d9b71d81da06e866ede8d65ff5e73c0c 100644
--- a/ppapi/thunk/ppb_widget_thunk.cc
+++ b/ppapi/thunk/ppb_widget_thunk.cc
@@ -44,7 +44,13 @@ void SetLocation(PP_Resource widget, const PP_Rect* location) {
enter.object()->SetLocation(location);
}
-const PPB_Widget_Dev g_ppb_widget_thunk = {
+void SetScale(PP_Resource widget, float scale) {
+ EnterResource<PPB_Widget_API> enter(widget, false);
+ if (enter.succeeded())
+ enter.object()->SetScale(scale);
+}
+
+const PPB_Widget_Dev_0_3 g_ppb_widget_thunk_0_3 = {
&IsWidget,
&Paint,
&HandleEvent,
@@ -52,10 +58,23 @@ const PPB_Widget_Dev g_ppb_widget_thunk = {
&SetLocation,
};
+const PPB_Widget_Dev_0_4 g_ppb_widget_thunk_0_4 = {
+ &IsWidget,
+ &Paint,
+ &HandleEvent,
+ &GetLocation,
+ &SetLocation,
+ &SetScale
+};
+
} // namespace
const PPB_Widget_Dev_0_3* GetPPB_Widget_Dev_0_3_Thunk() {
- return &g_ppb_widget_thunk;
+ return &g_ppb_widget_thunk_0_3;
+}
+
+const PPB_Widget_Dev_0_4* GetPPB_Widget_Dev_0_4_Thunk() {
+ return &g_ppb_widget_thunk_0_4;
}
} // namespace thunk
« no previous file with comments | « ppapi/thunk/ppb_widget_api.h ('k') | webkit/plugins/ppapi/ppb_scrollbar_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698