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

Side by Side 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 unified diff | Download patch | Annotate | Revision Log
« 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 »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 #include "ppapi/thunk/thunk.h" 5 #include "ppapi/thunk/thunk.h"
6 #include "ppapi/thunk/enter.h" 6 #include "ppapi/thunk/enter.h"
7 #include "ppapi/thunk/ppb_widget_api.h" 7 #include "ppapi/thunk/ppb_widget_api.h"
8 #include "ppapi/thunk/resource_creation_api.h" 8 #include "ppapi/thunk/resource_creation_api.h"
9 9
10 namespace ppapi { 10 namespace ppapi {
(...skipping 26 matching lines...) Expand all
37 return PP_FALSE; 37 return PP_FALSE;
38 return enter.object()->GetLocation(location); 38 return enter.object()->GetLocation(location);
39 } 39 }
40 40
41 void SetLocation(PP_Resource widget, const PP_Rect* location) { 41 void SetLocation(PP_Resource widget, const PP_Rect* location) {
42 EnterResource<PPB_Widget_API> enter(widget, false); 42 EnterResource<PPB_Widget_API> enter(widget, false);
43 if (enter.succeeded()) 43 if (enter.succeeded())
44 enter.object()->SetLocation(location); 44 enter.object()->SetLocation(location);
45 } 45 }
46 46
47 const PPB_Widget_Dev g_ppb_widget_thunk = { 47 void SetScale(PP_Resource widget, float scale) {
48 EnterResource<PPB_Widget_API> enter(widget, false);
49 if (enter.succeeded())
50 enter.object()->SetScale(scale);
51 }
52
53 const PPB_Widget_Dev_0_3 g_ppb_widget_thunk_0_3 = {
48 &IsWidget, 54 &IsWidget,
49 &Paint, 55 &Paint,
50 &HandleEvent, 56 &HandleEvent,
51 &GetLocation, 57 &GetLocation,
52 &SetLocation, 58 &SetLocation,
53 }; 59 };
54 60
61 const PPB_Widget_Dev_0_4 g_ppb_widget_thunk_0_4 = {
62 &IsWidget,
63 &Paint,
64 &HandleEvent,
65 &GetLocation,
66 &SetLocation,
67 &SetScale
68 };
69
55 } // namespace 70 } // namespace
56 71
57 const PPB_Widget_Dev_0_3* GetPPB_Widget_Dev_0_3_Thunk() { 72 const PPB_Widget_Dev_0_3* GetPPB_Widget_Dev_0_3_Thunk() {
58 return &g_ppb_widget_thunk; 73 return &g_ppb_widget_thunk_0_3;
74 }
75
76 const PPB_Widget_Dev_0_4* GetPPB_Widget_Dev_0_4_Thunk() {
77 return &g_ppb_widget_thunk_0_4;
59 } 78 }
60 79
61 } // namespace thunk 80 } // namespace thunk
62 } // namespace ppapi 81 } // namespace ppapi
OLDNEW
« 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