diff options
author | jam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-08-10 23:22:30 +0000 |
---|---|---|
committer | jam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-08-10 23:22:30 +0000 |
commit | a240fd6bb0683f319541155ccddd3e422e180c82 (patch) | |
tree | f764aadadddaffff0d360b3ed0fcd9cedd2d5678 /ppapi/thunk/ppb_scrollbar_thunk.cc | |
parent | f1c2c71fcc78a5f1740d59b3b5cd8fb7c8018026 (diff) | |
download | chromium_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/ppb_scrollbar_thunk.cc')
-rw-r--r-- | ppapi/thunk/ppb_scrollbar_thunk.cc | 12 |
1 files changed, 10 insertions, 2 deletions
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; } |