| Index: ppapi/thunk/ppb_view_thunk.cc
|
| diff --git a/ppapi/thunk/ppb_view_thunk.cc b/ppapi/thunk/ppb_view_thunk.cc
|
| index 874513b6b30d7e5e3f71438e4af77594ef38e9f0..3aad4ec71e8332126e326d23fe7fd27703e37def 100644
|
| --- a/ppapi/thunk/ppb_view_thunk.cc
|
| +++ b/ppapi/thunk/ppb_view_thunk.cc
|
| @@ -3,6 +3,7 @@
|
| // found in the LICENSE file.
|
|
|
| #include "ppapi/c/ppb_view.h"
|
| +#include "ppapi/c/private/ppb_view_private.h"
|
| #include "ppapi/shared_impl/ppb_view_shared.h"
|
| #include "ppapi/thunk/enter.h"
|
| #include "ppapi/thunk/ppb_view_api.h"
|
| @@ -77,6 +78,22 @@ PP_Bool GetClipRect(PP_Resource resource, PP_Rect* clip) {
|
| return PP_TRUE;
|
| }
|
|
|
| +PP_Bool GetDeviceScale(PP_Resource resource, float* device_scale) {
|
| + EnterView enter(resource, true);
|
| + if (enter.failed() || !device_scale)
|
| + return PP_FALSE;
|
| + *device_scale = enter.object()->GetData().device_scale;
|
| + return PP_TRUE;
|
| +}
|
| +
|
| +PP_Bool GetCSSScale(PP_Resource resource, float* css_scale) {
|
| + EnterView enter(resource, true);
|
| + if (enter.failed() || !css_scale)
|
| + return PP_FALSE;
|
| + *css_scale = enter.object()->GetData().css_scale;
|
| + return PP_TRUE;
|
| +}
|
| +
|
| const PPB_View g_ppb_view_thunk = {
|
| &IsView,
|
| &GetRect,
|
| @@ -86,11 +103,20 @@ const PPB_View g_ppb_view_thunk = {
|
| &GetClipRect
|
| };
|
|
|
| +const PPB_View_Private g_ppb_view_private_thunk = {
|
| + &GetDeviceScale,
|
| + &GetCSSScale
|
| +};
|
| +
|
| } // namespace
|
|
|
| const PPB_View* GetPPB_View_1_0_Thunk() {
|
| return &g_ppb_view_thunk;
|
| }
|
|
|
| +const PPB_View_Private* GetPPB_View_Private_0_1_Thunk() {
|
| + return &g_ppb_view_private_thunk;
|
| +}
|
| +
|
| } // namespace thunk
|
| } // namespace ppapi
|
|
|