| 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 |
| (...skipping 30 matching lines...) Expand all Loading... |
| 41 class HostWindow; | 41 class HostWindow; |
| 42 class IntRect; | 42 class IntRect; |
| 43 class PlatformGestureEvent; | 43 class PlatformGestureEvent; |
| 44 class PlatformMouseEvent; | 44 class PlatformMouseEvent; |
| 45 class ScrollAnimatorBase; | 45 class ScrollAnimatorBase; |
| 46 class ScrollableArea; | 46 class ScrollableArea; |
| 47 class ScrollbarTheme; | 47 class ScrollbarTheme; |
| 48 | 48 |
| 49 class PLATFORM_EXPORT Scrollbar : public Widget, public ScrollbarThemeClient { | 49 class PLATFORM_EXPORT Scrollbar : public Widget, public ScrollbarThemeClient { |
| 50 public: | 50 public: |
| 51 static PassRefPtrWillBeRawPtr<Scrollbar> create(ScrollableArea*, ScrollbarOr
ientation, ScrollbarControlSize, HostWindow*); | 51 static RawPtr<Scrollbar> create(ScrollableArea*, ScrollbarOrientation, Scrol
lbarControlSize, HostWindow*); |
| 52 | 52 |
| 53 // Theme object ownership remains with the caller and it must outlive the sc
rollbar. | 53 // Theme object ownership remains with the caller and it must outlive the sc
rollbar. |
| 54 static PassRefPtrWillBeRawPtr<Scrollbar> createForTesting(ScrollableArea*, S
crollbarOrientation, ScrollbarControlSize, ScrollbarTheme*); | 54 static RawPtr<Scrollbar> createForTesting(ScrollableArea*, ScrollbarOrientat
ion, ScrollbarControlSize, ScrollbarTheme*); |
| 55 | 55 |
| 56 ~Scrollbar() override; | 56 ~Scrollbar() override; |
| 57 | 57 |
| 58 // ScrollbarThemeClient implementation. | 58 // ScrollbarThemeClient implementation. |
| 59 int x() const override { return Widget::x(); } | 59 int x() const override { return Widget::x(); } |
| 60 int y() const override { return Widget::y(); } | 60 int y() const override { return Widget::y(); } |
| 61 int width() const override { return Widget::width(); } | 61 int width() const override { return Widget::width(); } |
| 62 int height() const override { return Widget::height(); } | 62 int height() const override { return Widget::height(); } |
| 63 IntSize size() const override { return Widget::size(); } | 63 IntSize size() const override { return Widget::size(); } |
| 64 IntPoint location() const override { return Widget::location(); } | 64 IntPoint location() const override { return Widget::location(); } |
| (...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 183 protected: | 183 protected: |
| 184 Scrollbar(ScrollableArea*, ScrollbarOrientation, ScrollbarControlSize, HostW
indow* = 0, ScrollbarTheme* = 0); | 184 Scrollbar(ScrollableArea*, ScrollbarOrientation, ScrollbarControlSize, HostW
indow* = 0, ScrollbarTheme* = 0); |
| 185 | 185 |
| 186 void autoscrollTimerFired(Timer<Scrollbar>*); | 186 void autoscrollTimerFired(Timer<Scrollbar>*); |
| 187 void startTimerIfNeeded(double delay); | 187 void startTimerIfNeeded(double delay); |
| 188 void stopTimerIfNeeded(); | 188 void stopTimerIfNeeded(); |
| 189 void autoscrollPressedPart(double delay); | 189 void autoscrollPressedPart(double delay); |
| 190 ScrollDirectionPhysical pressedPartScrollDirectionPhysical(); | 190 ScrollDirectionPhysical pressedPartScrollDirectionPhysical(); |
| 191 ScrollGranularity pressedPartScrollGranularity(); | 191 ScrollGranularity pressedPartScrollGranularity(); |
| 192 | 192 |
| 193 RawPtrWillBeMember<ScrollableArea> m_scrollableArea; | 193 Member<ScrollableArea> m_scrollableArea; |
| 194 ScrollbarOrientation m_orientation; | 194 ScrollbarOrientation m_orientation; |
| 195 ScrollbarControlSize m_controlSize; | 195 ScrollbarControlSize m_controlSize; |
| 196 ScrollbarTheme& m_theme; | 196 ScrollbarTheme& m_theme; |
| 197 RawPtrWillBeMember<HostWindow> m_hostWindow; | 197 Member<HostWindow> m_hostWindow; |
| 198 | 198 |
| 199 int m_visibleSize; | 199 int m_visibleSize; |
| 200 int m_totalSize; | 200 int m_totalSize; |
| 201 float m_currentPos; | 201 float m_currentPos; |
| 202 float m_dragOrigin; | 202 float m_dragOrigin; |
| 203 | 203 |
| 204 ScrollbarPart m_hoveredPart; | 204 ScrollbarPart m_hoveredPart; |
| 205 ScrollbarPart m_pressedPart; | 205 ScrollbarPart m_pressedPart; |
| 206 int m_pressedPos; | 206 int m_pressedPos; |
| 207 float m_scrollPos; | 207 float m_scrollPos; |
| (...skipping 19 matching lines...) Expand all Loading... |
| 227 | 227 |
| 228 bool m_trackNeedsRepaint; | 228 bool m_trackNeedsRepaint; |
| 229 bool m_thumbNeedsRepaint; | 229 bool m_thumbNeedsRepaint; |
| 230 }; | 230 }; |
| 231 | 231 |
| 232 DEFINE_TYPE_CASTS(Scrollbar, Widget, widget, widget->isScrollbar(), widget.isScr
ollbar()); | 232 DEFINE_TYPE_CASTS(Scrollbar, Widget, widget, widget->isScrollbar(), widget.isScr
ollbar()); |
| 233 | 233 |
| 234 } // namespace blink | 234 } // namespace blink |
| 235 | 235 |
| 236 #endif // Scrollbar_h | 236 #endif // Scrollbar_h |
| OLD | NEW |