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

Unified Diff: ppapi/c/ppb_view.h

Issue 329033003: Add GetScrollOffset function to PPB_View (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 6 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
Index: ppapi/c/ppb_view.h
diff --git a/ppapi/c/ppb_view.h b/ppapi/c/ppb_view.h
index 8b82c78a3b8d3776fa07071a61908a20188d03ce..72a215fee7e1bba5351b4b1b6dcf6fc13243924d 100644
--- a/ppapi/c/ppb_view.h
+++ b/ppapi/c/ppb_view.h
@@ -3,7 +3,7 @@
* found in the LICENSE file.
*/
-/* From ppb_view.idl modified Fri Mar 29 11:55:32 2013. */
+/* From ppb_view.idl modified Wed Jun 11 16:36:35 2014. */
#ifndef PPAPI_C_PPB_VIEW_H_
#define PPAPI_C_PPB_VIEW_H_
@@ -18,7 +18,8 @@
#define PPB_VIEW_INTERFACE_1_0 "PPB_View;1.0"
#define PPB_VIEW_INTERFACE_1_1 "PPB_View;1.1"
-#define PPB_VIEW_INTERFACE PPB_VIEW_INTERFACE_1_1
+#define PPB_VIEW_INTERFACE_1_2 "PPB_View;1.2"
+#define PPB_VIEW_INTERFACE PPB_VIEW_INTERFACE_1_2
/**
* @file
@@ -36,7 +37,7 @@
* You will receive new view information using
* <code>PPP_Instance.DidChangeView</code>.
*/
-struct PPB_View_1_1 {
+struct PPB_View_1_2 {
/**
* IsView() determines if the given resource is a valid
* <code>PPB_View</code> resource. Note that <code>PPB_ViewChanged</code>
@@ -197,9 +198,24 @@ struct PPB_View_1_1 {
* DIPs per CSS pixel. If the resource is invalid, the value will be 0.0.
*/
float (*GetCSSScale)(PP_Resource resource);
+ /**
+ * GetScrollOffset returns the scroll offset of the window containing the
+ * plugin. This value will only be valid if the module instance is visible
+ * (that is, IsVisible() is true) otherwise (0, 0) will be returned.
+ *
+ * @param[in] resource A <code>PP_Resource</code> corresponding to a
+ * <code>PPB_View</code> resource.
+ *
+ * @param[out] offset A <code>PP_Point</code> which will be set to the value
+ * of the scroll offset.
+ *
+ * @return Returns <code>PP_TRUE</code> if the resource was valid and the
+ * offset was filled in, <code>PP_FALSE</code> if not.
+ */
+ PP_Bool (*GetScrollOffset)(PP_Resource resource, struct PP_Point* offset);
};
-typedef struct PPB_View_1_1 PPB_View;
+typedef struct PPB_View_1_2 PPB_View;
struct PPB_View_1_0 {
PP_Bool (*IsView)(PP_Resource resource);
@@ -209,6 +225,17 @@ struct PPB_View_1_0 {
PP_Bool (*IsPageVisible)(PP_Resource resource);
PP_Bool (*GetClipRect)(PP_Resource resource, struct PP_Rect* clip);
};
+
+struct PPB_View_1_1 {
+ PP_Bool (*IsView)(PP_Resource resource);
+ PP_Bool (*GetRect)(PP_Resource resource, struct PP_Rect* rect);
+ PP_Bool (*IsFullscreen)(PP_Resource resource);
+ PP_Bool (*IsVisible)(PP_Resource resource);
+ PP_Bool (*IsPageVisible)(PP_Resource resource);
+ PP_Bool (*GetClipRect)(PP_Resource resource, struct PP_Rect* clip);
+ float (*GetDeviceScale)(PP_Resource resource);
+ float (*GetCSSScale)(PP_Resource resource);
+};
/**
* @}
*/
« ppapi/api/ppb_view.idl ('K') | « ppapi/api/ppb_view.idl ('k') | ppapi/cpp/view.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698