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

Unified Diff: ppapi/thunk/ppb_view_thunk.cc

Issue 12989006: Move HiDPI-related Pepper interfaces to stable (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase Created 7 years, 8 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_graphics_2d_thunk.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ppapi/thunk/ppb_view_thunk.cc
diff --git a/ppapi/thunk/ppb_view_thunk.cc b/ppapi/thunk/ppb_view_thunk.cc
index d0ff38afb5963c5eeb09333a79955b304eabbbc7..04a3931c56e84c059ab36911858376606ed98f2a 100644
--- a/ppapi/thunk/ppb_view_thunk.cc
+++ b/ppapi/thunk/ppb_view_thunk.cc
@@ -64,6 +64,20 @@ PP_Bool GetClipRect(PP_Resource resource, struct PP_Rect* clip) {
return enter.object()->GetClipRect(clip);
}
+float GetDeviceScale(PP_Resource resource) {
+ EnterResource<PPB_View_API> enter(resource, true);
+ if (enter.failed())
+ return 0.0f;
+ return enter.object()->GetDeviceScale();
+}
+
+float GetCSSScale(PP_Resource resource) {
+ EnterResource<PPB_View_API> enter(resource, true);
+ if (enter.failed())
+ return 0.0f;
+ return enter.object()->GetCSSScale();
+}
+
const PPB_View_1_0 g_ppb_view_thunk_1_0 = {
&IsView,
&GetRect,
@@ -73,11 +87,26 @@ const PPB_View_1_0 g_ppb_view_thunk_1_0 = {
&GetClipRect
};
+const PPB_View_1_1 g_ppb_view_thunk_1_1 = {
+ &IsView,
+ &GetRect,
+ &IsFullscreen,
+ &IsVisible,
+ &IsPageVisible,
+ &GetClipRect,
+ &GetDeviceScale,
+ &GetCSSScale
+};
+
} // namespace
const PPB_View_1_0* GetPPB_View_1_0_Thunk() {
return &g_ppb_view_thunk_1_0;
}
+const PPB_View_1_1* GetPPB_View_1_1_Thunk() {
+ return &g_ppb_view_thunk_1_1;
+}
+
} // namespace thunk
} // namespace ppapi
« no previous file with comments | « ppapi/thunk/ppb_graphics_2d_thunk.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698