summaryrefslogtreecommitdiffstats
path: root/ppapi/thunk
diff options
context:
space:
mode:
Diffstat (limited to 'ppapi/thunk')
-rw-r--r--ppapi/thunk/ppb_scrollbar_api.h1
-rw-r--r--ppapi/thunk/ppb_scrollbar_thunk.cc12
-rw-r--r--ppapi/thunk/thunk.h4
3 files changed, 13 insertions, 4 deletions
diff --git a/ppapi/thunk/ppb_scrollbar_api.h b/ppapi/thunk/ppb_scrollbar_api.h
index 05b3c17..042eec8 100644
--- a/ppapi/thunk/ppb_scrollbar_api.h
+++ b/ppapi/thunk/ppb_scrollbar_api.h
@@ -15,6 +15,7 @@ class PPB_Scrollbar_API {
virtual ~PPB_Scrollbar_API() {}
virtual uint32_t GetThickness() = 0;
+ virtual bool IsOverlay() = 0;
virtual uint32_t GetValue() = 0;
virtual void SetValue(uint32_t value) = 0;
virtual void SetDocumentSize(uint32_t size) = 0;
diff --git a/ppapi/thunk/ppb_scrollbar_thunk.cc b/ppapi/thunk/ppb_scrollbar_thunk.cc
index 7b67db2..6e66483 100644
--- a/ppapi/thunk/ppb_scrollbar_thunk.cc
+++ b/ppapi/thunk/ppb_scrollbar_thunk.cc
@@ -33,6 +33,13 @@ uint32_t GetThickness(PP_Resource scrollbar) {
return enter.object()->GetThickness();
}
+PP_Bool IsOverlay(PP_Resource scrollbar) {
+ EnterScrollbar enter(scrollbar, true);
+ if (enter.failed())
+ return PP_FALSE;
+ return PP_FromBool(enter.object()->IsOverlay());
+}
+
uint32_t GetValue(PP_Resource scrollbar) {
EnterScrollbar enter(scrollbar, true);
if (enter.failed())
@@ -66,10 +73,11 @@ void ScrollBy(PP_Resource scrollbar, PP_ScrollBy_Dev unit, int32_t multiplier) {
enter.object()->ScrollBy(unit, multiplier);
}
-const PPB_Scrollbar_0_4_Dev g_ppb_scrollbar_thunk = {
+const PPB_Scrollbar_0_5_Dev g_ppb_scrollbar_thunk = {
&Create,
&IsScrollbar,
&GetThickness,
+ &IsOverlay,
&GetValue,
&SetValue,
&SetDocumentSize,
@@ -79,7 +87,7 @@ const PPB_Scrollbar_0_4_Dev g_ppb_scrollbar_thunk = {
} // namespace
-const PPB_Scrollbar_0_4_Dev* GetPPB_Scrollbar_Thunk() {
+const PPB_Scrollbar_0_5_Dev* GetPPB_Scrollbar_Thunk() {
return &g_ppb_scrollbar_thunk;
}
diff --git a/ppapi/thunk/thunk.h b/ppapi/thunk/thunk.h
index ac0008e..c7ac742 100644
--- a/ppapi/thunk/thunk.h
+++ b/ppapi/thunk/thunk.h
@@ -40,7 +40,7 @@ struct PPB_LayerCompositor_Dev;
struct PPB_Messaging;
struct PPB_MouseInputEvent;
struct PPB_QueryPolicy_Dev;
-struct PPB_Scrollbar_0_4_Dev;
+struct PPB_Scrollbar_0_5_Dev;
struct PPB_Surface3D_Dev;
struct PPB_Transport_Dev;
struct PPB_URLLoader;
@@ -95,7 +95,7 @@ const PPB_LayerCompositor_Dev* GetPPB_LayerCompositor_Thunk();
const PPB_QueryPolicy_Dev* GetPPB_QueryPolicy_Thunk();
const PPB_Messaging* GetPPB_Messaging_Thunk();
const PPB_MouseInputEvent* GetPPB_MouseInputEvent_Thunk();
-const PPB_Scrollbar_0_4_Dev* GetPPB_Scrollbar_Thunk();
+const PPB_Scrollbar_0_5_Dev* GetPPB_Scrollbar_Thunk();
const PPB_Surface3D_Dev* GetPPB_Surface3D_Thunk();
const PPB_Transport_Dev* GetPPB_Transport_Thunk();
const PPB_URLLoader* GetPPB_URLLoader_Thunk();