| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef WEBKIT_PLUGINS_PPAPI_PPB_SCROLLBAR_IMPL_H_ | 5 #ifndef WEBKIT_PLUGINS_PPAPI_PPB_SCROLLBAR_IMPL_H_ |
| 6 #define WEBKIT_PLUGINS_PPAPI_PPB_SCROLLBAR_IMPL_H_ | 6 #define WEBKIT_PLUGINS_PPAPI_PPB_SCROLLBAR_IMPL_H_ |
| 7 | 7 |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "ppapi/thunk/ppb_scrollbar_api.h" | 10 #include "ppapi/thunk/ppb_scrollbar_api.h" |
| (...skipping 15 matching lines...) Expand all Loading... |
| 26 virtual ~PPB_Scrollbar_Impl(); | 26 virtual ~PPB_Scrollbar_Impl(); |
| 27 | 27 |
| 28 // ResourceObjectBase override. | 28 // ResourceObjectBase override. |
| 29 virtual PPB_Scrollbar_API* AsPPB_Scrollbar_API() OVERRIDE; | 29 virtual PPB_Scrollbar_API* AsPPB_Scrollbar_API() OVERRIDE; |
| 30 | 30 |
| 31 // Returns a pointer to the interface implementing PPB_Scrollbar_0_3 that is | 31 // Returns a pointer to the interface implementing PPB_Scrollbar_0_3 that is |
| 32 // exposed to the plugin. New code should use the thunk system for the new | 32 // exposed to the plugin. New code should use the thunk system for the new |
| 33 // version of this API. | 33 // version of this API. |
| 34 static const PPB_Scrollbar_0_3_Dev* Get0_3Interface(); | 34 static const PPB_Scrollbar_0_3_Dev* Get0_3Interface(); |
| 35 | 35 |
| 36 // Returns a pointer to the interface implementing PPB_Scrollbar_0_4 that is |
| 37 // exposed to the plugin. New code should use the thunk system for the new |
| 38 // version of this API. |
| 39 static const PPB_Scrollbar_0_4_Dev* Get0_4Interface(); |
| 40 |
| 36 // PPB_Scrollbar_API implementation. | 41 // PPB_Scrollbar_API implementation. |
| 37 virtual uint32_t GetThickness() OVERRIDE; | 42 virtual uint32_t GetThickness() OVERRIDE; |
| 43 virtual bool IsOverlay() OVERRIDE; |
| 38 virtual uint32_t GetValue() OVERRIDE; | 44 virtual uint32_t GetValue() OVERRIDE; |
| 39 virtual void SetValue(uint32_t value) OVERRIDE; | 45 virtual void SetValue(uint32_t value) OVERRIDE; |
| 40 virtual void SetDocumentSize(uint32_t size) OVERRIDE; | 46 virtual void SetDocumentSize(uint32_t size) OVERRIDE; |
| 41 virtual void SetTickMarks(const PP_Rect* tick_marks, uint32_t count) OVERRIDE; | 47 virtual void SetTickMarks(const PP_Rect* tick_marks, uint32_t count) OVERRIDE; |
| 42 virtual void ScrollBy(PP_ScrollBy_Dev unit, int32_t multiplier) OVERRIDE; | 48 virtual void ScrollBy(PP_ScrollBy_Dev unit, int32_t multiplier) OVERRIDE; |
| 43 | 49 |
| 44 private: | 50 private: |
| 45 // PPB_Widget private implementation. | 51 // PPB_Widget private implementation. |
| 46 virtual PP_Bool PaintInternal(const gfx::Rect& rect, | 52 virtual PP_Bool PaintInternal(const gfx::Rect& rect, |
| 47 PPB_ImageData_Impl* image) OVERRIDE; | 53 PPB_ImageData_Impl* image) OVERRIDE; |
| 48 virtual PP_Bool HandleEventInternal( | 54 virtual PP_Bool HandleEventInternal( |
| 49 const ::ppapi::InputEventData& data) OVERRIDE; | 55 const ::ppapi::InputEventData& data) OVERRIDE; |
| 50 virtual void SetLocationInternal(const PP_Rect* location) OVERRIDE; | 56 virtual void SetLocationInternal(const PP_Rect* location) OVERRIDE; |
| 51 | 57 |
| 52 // WebKit::WebScrollbarClient implementation. | 58 // WebKit::WebScrollbarClient implementation. |
| 53 virtual void valueChanged(WebKit::WebScrollbar* scrollbar) OVERRIDE; | 59 virtual void valueChanged(WebKit::WebScrollbar* scrollbar) OVERRIDE; |
| 60 virtual void overlayChanged(WebKit::WebScrollbar* scrollbar) OVERRIDE; |
| 54 virtual void invalidateScrollbarRect(WebKit::WebScrollbar* scrollbar, | 61 virtual void invalidateScrollbarRect(WebKit::WebScrollbar* scrollbar, |
| 55 const WebKit::WebRect& rect) OVERRIDE; | 62 const WebKit::WebRect& rect) OVERRIDE; |
| 56 virtual void getTickmarks( | 63 virtual void getTickmarks( |
| 57 WebKit::WebScrollbar* scrollbar, | 64 WebKit::WebScrollbar* scrollbar, |
| 58 WebKit::WebVector<WebKit::WebRect>* tick_marks) const OVERRIDE; | 65 WebKit::WebVector<WebKit::WebRect>* tick_marks) const OVERRIDE; |
| 59 | 66 |
| 60 void NotifyInvalidate(); | 67 void NotifyInvalidate(); |
| 61 | 68 |
| 62 gfx::Rect dirty_; | 69 gfx::Rect dirty_; |
| 63 std::vector<WebKit::WebRect> tickmarks_; | 70 std::vector<WebKit::WebRect> tickmarks_; |
| 64 scoped_ptr<WebKit::WebScrollbar> scrollbar_; | 71 scoped_ptr<WebKit::WebScrollbar> scrollbar_; |
| 65 | 72 |
| 66 DISALLOW_COPY_AND_ASSIGN(PPB_Scrollbar_Impl); | 73 DISALLOW_COPY_AND_ASSIGN(PPB_Scrollbar_Impl); |
| 67 }; | 74 }; |
| 68 | 75 |
| 69 } // namespace ppapi | 76 } // namespace ppapi |
| 70 } // namespace webkit | 77 } // namespace webkit |
| 71 | 78 |
| 72 #endif // WEBKIT_PLUGINS_PPAPI_PPB_SCROLLBAR_IMPL_H_ | 79 #endif // WEBKIT_PLUGINS_PPAPI_PPB_SCROLLBAR_IMPL_H_ |
| OLD | NEW |