OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2004, 2006 Apple Computer, Inc. All rights reserved. | 2 * Copyright (C) 2004, 2006 Apple Computer, Inc. All rights reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions | 5 * modification, are permitted provided that the following conditions |
6 * are met: | 6 * are met: |
7 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
11 * documentation and/or other materials provided with the distribution. | 11 * documentation and/or other materials provided with the distribution. |
12 * | 12 * |
13 * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY | 13 * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY |
14 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | 14 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE |
15 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR | 15 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR |
16 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR | 16 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR |
17 * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, | 17 * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, |
18 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, | 18 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, |
19 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR | 19 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR |
20 * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY | 20 * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY |
21 * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | 21 * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
22 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | 22 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
23 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 23 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
24 */ | 24 */ |
25 | 25 |
26 #ifndef Scrollbar_h | 26 #ifndef Scrollbar_h |
27 #define Scrollbar_h | 27 #define Scrollbar_h |
28 | 28 |
29 #include "platform/FrameViewBase.h" | |
30 #include "platform/Timer.h" | 29 #include "platform/Timer.h" |
31 #include "platform/graphics/paint/DisplayItem.h" | 30 #include "platform/graphics/paint/DisplayItem.h" |
32 #include "platform/heap/Handle.h" | 31 #include "platform/heap/Handle.h" |
33 #include "platform/scroll/ScrollTypes.h" | 32 #include "platform/scroll/ScrollTypes.h" |
34 #include "platform/scroll/ScrollbarThemeClient.h" | 33 #include "platform/scroll/ScrollbarThemeClient.h" |
35 #include "platform/wtf/MathExtras.h" | 34 #include "platform/wtf/MathExtras.h" |
36 | 35 |
37 namespace blink { | 36 namespace blink { |
38 | 37 |
39 class CullRect; | 38 class CullRect; |
| 39 class FrameViewBase; |
40 class GraphicsContext; | 40 class GraphicsContext; |
41 class IntRect; | 41 class IntRect; |
42 class PlatformChromeClient; | 42 class PlatformChromeClient; |
43 class ScrollableArea; | 43 class ScrollableArea; |
44 class ScrollbarTheme; | 44 class ScrollbarTheme; |
45 class WebGestureEvent; | 45 class WebGestureEvent; |
46 class WebMouseEvent; | 46 class WebMouseEvent; |
47 | 47 |
48 class PLATFORM_EXPORT Scrollbar : public GarbageCollectedFinalized<Scrollbar>, | 48 class PLATFORM_EXPORT Scrollbar : public GarbageCollectedFinalized<Scrollbar>, |
49 public ScrollbarThemeClient, | 49 public ScrollbarThemeClient, |
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
148 void MouseEntered(); | 148 void MouseEntered(); |
149 void MouseExited(); | 149 void MouseExited(); |
150 | 150 |
151 // Used by some platform scrollbars to know when they've been released from | 151 // Used by some platform scrollbars to know when they've been released from |
152 // capture. | 152 // capture. |
153 void MouseUp(const WebMouseEvent&); | 153 void MouseUp(const WebMouseEvent&); |
154 void MouseDown(const WebMouseEvent&); | 154 void MouseDown(const WebMouseEvent&); |
155 | 155 |
156 ScrollbarTheme& GetTheme() const { return theme_; } | 156 ScrollbarTheme& GetTheme() const { return theme_; } |
157 | 157 |
158 IntRect ConvertToContainingFrameViewBase(const IntRect&) const; | 158 IntRect ConvertToContainingFrameView(const IntRect&) const; |
159 IntPoint ConvertFromContainingFrameViewBase(const IntPoint&) const; | 159 IntPoint ConvertFromContainingFrameView(const IntPoint&) const; |
160 | 160 |
161 void MoveThumb(int pos, bool dragging_document = false); | 161 void MoveThumb(int pos, bool dragging_document = false); |
162 | 162 |
163 float ElasticOverscroll() const override { return elastic_overscroll_; } | 163 float ElasticOverscroll() const override { return elastic_overscroll_; } |
164 void SetElasticOverscroll(float elastic_overscroll) override { | 164 void SetElasticOverscroll(float elastic_overscroll) override { |
165 elastic_overscroll_ = elastic_overscroll; | 165 elastic_overscroll_ = elastic_overscroll; |
166 } | 166 } |
167 | 167 |
168 // Use setNeedsPaintInvalidation to cause the scrollbar (or parts thereof) | 168 // Use setNeedsPaintInvalidation to cause the scrollbar (or parts thereof) |
169 // to repaint. | 169 // to repaint. |
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
252 bool track_needs_repaint_; | 252 bool track_needs_repaint_; |
253 bool thumb_needs_repaint_; | 253 bool thumb_needs_repaint_; |
254 LayoutRect visual_rect_; | 254 LayoutRect visual_rect_; |
255 Member<FrameViewBase> parent_; | 255 Member<FrameViewBase> parent_; |
256 IntRect frame_rect_; | 256 IntRect frame_rect_; |
257 }; | 257 }; |
258 | 258 |
259 } // namespace blink | 259 } // namespace blink |
260 | 260 |
261 #endif // Scrollbar_h | 261 #endif // Scrollbar_h |
OLD | NEW |