| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 CONTENT_RENDERER_PEPPER_PPB_SCROLLBAR_IMPL_H_ | 5 #ifndef CONTENT_RENDERER_PEPPER_PPB_SCROLLBAR_IMPL_H_ |
| 6 #define CONTENT_RENDERER_PEPPER_PPB_SCROLLBAR_IMPL_H_ | 6 #define CONTENT_RENDERER_PEPPER_PPB_SCROLLBAR_IMPL_H_ |
| 7 | 7 |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "base/compiler_specific.h" | 10 #include "base/compiler_specific.h" |
| (...skipping 28 matching lines...) Expand all Loading... |
| 39 | 39 |
| 40 private: | 40 private: |
| 41 virtual ~PPB_Scrollbar_Impl(); | 41 virtual ~PPB_Scrollbar_Impl(); |
| 42 | 42 |
| 43 explicit PPB_Scrollbar_Impl(PP_Instance instance); | 43 explicit PPB_Scrollbar_Impl(PP_Instance instance); |
| 44 void Init(bool vertical); | 44 void Init(bool vertical); |
| 45 | 45 |
| 46 // PPB_Widget private implementation. | 46 // PPB_Widget private implementation. |
| 47 virtual PP_Bool PaintInternal(const gfx::Rect& rect, | 47 virtual PP_Bool PaintInternal(const gfx::Rect& rect, |
| 48 PPB_ImageData_Impl* image) OVERRIDE; | 48 PPB_ImageData_Impl* image) OVERRIDE; |
| 49 virtual PP_Bool HandleEventInternal( | 49 virtual PP_Bool HandleEventInternal(const ppapi::InputEventData& data) |
| 50 const ppapi::InputEventData& data) OVERRIDE; | 50 OVERRIDE; |
| 51 virtual void SetLocationInternal(const PP_Rect* location) OVERRIDE; | 51 virtual void SetLocationInternal(const PP_Rect* location) OVERRIDE; |
| 52 | 52 |
| 53 // blink::WebPluginScrollbarClient implementation. | 53 // blink::WebPluginScrollbarClient implementation. |
| 54 virtual void valueChanged(blink::WebPluginScrollbar* scrollbar) OVERRIDE; | 54 virtual void valueChanged(blink::WebPluginScrollbar* scrollbar) OVERRIDE; |
| 55 virtual void overlayChanged(blink::WebPluginScrollbar* scrollbar) OVERRIDE; | 55 virtual void overlayChanged(blink::WebPluginScrollbar* scrollbar) OVERRIDE; |
| 56 virtual void invalidateScrollbarRect(blink::WebPluginScrollbar* scrollbar, | 56 virtual void invalidateScrollbarRect(blink::WebPluginScrollbar* scrollbar, |
| 57 const blink::WebRect& rect) OVERRIDE; | 57 const blink::WebRect& rect) OVERRIDE; |
| 58 virtual void getTickmarks( | 58 virtual void getTickmarks(blink::WebPluginScrollbar* scrollbar, |
| 59 blink::WebPluginScrollbar* scrollbar, | 59 blink::WebVector<blink::WebRect>* tick_marks) const |
| 60 blink::WebVector<blink::WebRect>* tick_marks) const OVERRIDE; | 60 OVERRIDE; |
| 61 | 61 |
| 62 void NotifyInvalidate(); | 62 void NotifyInvalidate(); |
| 63 | 63 |
| 64 gfx::Rect dirty_; | 64 gfx::Rect dirty_; |
| 65 std::vector<blink::WebRect> tickmarks_; | 65 std::vector<blink::WebRect> tickmarks_; |
| 66 scoped_ptr<blink::WebPluginScrollbar> scrollbar_; | 66 scoped_ptr<blink::WebPluginScrollbar> scrollbar_; |
| 67 | 67 |
| 68 // Used so that the post task for Invalidate doesn't keep an extra reference. | 68 // Used so that the post task for Invalidate doesn't keep an extra reference. |
| 69 base::WeakPtrFactory<PPB_Scrollbar_Impl> weak_ptr_factory_; | 69 base::WeakPtrFactory<PPB_Scrollbar_Impl> weak_ptr_factory_; |
| 70 | 70 |
| 71 DISALLOW_COPY_AND_ASSIGN(PPB_Scrollbar_Impl); | 71 DISALLOW_COPY_AND_ASSIGN(PPB_Scrollbar_Impl); |
| 72 }; | 72 }; |
| 73 | 73 |
| 74 } // namespace content | 74 } // namespace content |
| 75 | 75 |
| 76 #endif // CONTENT_RENDERER_PEPPER_PPB_SCROLLBAR_IMPL_H_ | 76 #endif // CONTENT_RENDERER_PEPPER_PPB_SCROLLBAR_IMPL_H_ |
| OLD | NEW |