OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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/c/dev/ppb_scrollbar_dev.h" | 10 #include "ppapi/c/dev/ppb_scrollbar_dev.h" |
(...skipping 20 matching lines...) Expand all Loading... |
31 // Resource overrides. | 31 // Resource overrides. |
32 virtual PPB_Scrollbar_Impl* AsPPB_Scrollbar_Impl(); | 32 virtual PPB_Scrollbar_Impl* AsPPB_Scrollbar_Impl(); |
33 | 33 |
34 // PPB_Scrollbar implementation. | 34 // PPB_Scrollbar implementation. |
35 uint32_t GetValue(); | 35 uint32_t GetValue(); |
36 void SetValue(uint32_t value); | 36 void SetValue(uint32_t value); |
37 void SetDocumentSize(uint32_t size); | 37 void SetDocumentSize(uint32_t size); |
38 void SetTickMarks(const PP_Rect* tick_marks, uint32_t count); | 38 void SetTickMarks(const PP_Rect* tick_marks, uint32_t count); |
39 void ScrollBy(PP_ScrollBy_Dev unit, int32_t multiplier); | 39 void ScrollBy(PP_ScrollBy_Dev unit, int32_t multiplier); |
40 | 40 |
41 // PPB_Widget implementation. | 41 // PPB_Widget public implementation. |
42 virtual bool Paint(const PP_Rect* rect, PPB_ImageData_Impl* image); | 42 virtual PP_Bool HandleEvent(const PP_InputEvent* event) OVERRIDE; |
43 virtual bool HandleEvent(const PP_InputEvent* event); | |
44 virtual void SetLocationInternal(const PP_Rect* location); | |
45 | 43 |
46 private: | 44 private: |
| 45 // PPB_Widget private implementation. |
| 46 virtual PP_Bool PaintInternal(const gfx::Rect& rect, |
| 47 PPB_ImageData_Impl* image) OVERRIDE; |
| 48 virtual void SetLocationInternal(const PP_Rect* location) OVERRIDE; |
| 49 |
47 // WebKit::WebScrollbarClient implementation. | 50 // WebKit::WebScrollbarClient implementation. |
48 virtual void valueChanged(WebKit::WebScrollbar* scrollbar); | 51 virtual void valueChanged(WebKit::WebScrollbar* scrollbar) OVERRIDE; |
49 virtual void invalidateScrollbarRect(WebKit::WebScrollbar* scrollbar, | 52 virtual void invalidateScrollbarRect(WebKit::WebScrollbar* scrollbar, |
50 const WebKit::WebRect& rect); | 53 const WebKit::WebRect& rect) OVERRIDE; |
51 virtual void getTickmarks( | 54 virtual void getTickmarks( |
52 WebKit::WebScrollbar* scrollbar, | 55 WebKit::WebScrollbar* scrollbar, |
53 WebKit::WebVector<WebKit::WebRect>* tick_marks) const; | 56 WebKit::WebVector<WebKit::WebRect>* tick_marks) const OVERRIDE; |
54 | 57 |
55 void NotifyInvalidate(); | 58 void NotifyInvalidate(); |
56 | 59 |
57 gfx::Rect dirty_; | 60 gfx::Rect dirty_; |
58 std::vector<WebKit::WebRect> tickmarks_; | 61 std::vector<WebKit::WebRect> tickmarks_; |
59 scoped_ptr<WebKit::WebScrollbar> scrollbar_; | 62 scoped_ptr<WebKit::WebScrollbar> scrollbar_; |
60 | 63 |
61 DISALLOW_COPY_AND_ASSIGN(PPB_Scrollbar_Impl); | 64 DISALLOW_COPY_AND_ASSIGN(PPB_Scrollbar_Impl); |
62 }; | 65 }; |
63 | 66 |
64 } // namespace ppapi | 67 } // namespace ppapi |
65 } // namespace webkit | 68 } // namespace webkit |
66 | 69 |
67 #endif // WEBKIT_PLUGINS_PPAPI_PPB_SCROLLBAR_IMPL_H_ | 70 #endif // WEBKIT_PLUGINS_PPAPI_PPB_SCROLLBAR_IMPL_H_ |
OLD | NEW |