summaryrefslogtreecommitdiffstats
path: root/ppapi/thunk
diff options
context:
space:
mode:
authorjam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-08-10 23:22:30 +0000
committerjam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-08-10 23:22:30 +0000
commita240fd6bb0683f319541155ccddd3e422e180c82 (patch)
treef764aadadddaffff0d360b3ed0fcd9cedd2d5678 /ppapi/thunk
parentf1c2c71fcc78a5f1740d59b3b5cd8fb7c8018026 (diff)
downloadchromium_src-a240fd6bb0683f319541155ccddd3e422e180c82.zip
chromium_src-a240fd6bb0683f319541155ccddd3e422e180c82.tar.gz
chromium_src-a240fd6bb0683f319541155ccddd3e422e180c82.tar.bz2
Pepper and WebKit API change to support a plugin knowing if a scrollbar is an overlay one.
BUG=90530 Review URL: http://codereview.chromium.org/7538006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@96244 0039d316-1c4b-4281-b951-d872f2087c98
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();