| 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 120 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 185 protected: | 185 protected: |
| 186 Scrollbar(ScrollableArea*, ScrollbarOrientation, ScrollbarControlSize, HostW
indow* = 0, ScrollbarTheme* = 0); | 186 Scrollbar(ScrollableArea*, ScrollbarOrientation, ScrollbarControlSize, HostW
indow* = 0, ScrollbarTheme* = 0); |
| 187 | 187 |
| 188 void autoscrollTimerFired(Timer<Scrollbar>*); | 188 void autoscrollTimerFired(Timer<Scrollbar>*); |
| 189 void startTimerIfNeeded(double delay); | 189 void startTimerIfNeeded(double delay); |
| 190 void stopTimerIfNeeded(); | 190 void stopTimerIfNeeded(); |
| 191 void autoscrollPressedPart(double delay); | 191 void autoscrollPressedPart(double delay); |
| 192 ScrollDirectionPhysical pressedPartScrollDirectionPhysical(); | 192 ScrollDirectionPhysical pressedPartScrollDirectionPhysical(); |
| 193 ScrollGranularity pressedPartScrollGranularity(); | 193 ScrollGranularity pressedPartScrollGranularity(); |
| 194 | 194 |
| 195 RawPtrWillBeMember<ScrollableArea> m_scrollableArea; | 195 Member<ScrollableArea> m_scrollableArea; |
| 196 ScrollbarOrientation m_orientation; | 196 ScrollbarOrientation m_orientation; |
| 197 ScrollbarControlSize m_controlSize; | 197 ScrollbarControlSize m_controlSize; |
| 198 ScrollbarTheme& m_theme; | 198 ScrollbarTheme& m_theme; |
| 199 RawPtrWillBeMember<HostWindow> m_hostWindow; | 199 Member<HostWindow> m_hostWindow; |
| 200 | 200 |
| 201 int m_visibleSize; | 201 int m_visibleSize; |
| 202 int m_totalSize; | 202 int m_totalSize; |
| 203 float m_currentPos; | 203 float m_currentPos; |
| 204 float m_dragOrigin; | 204 float m_dragOrigin; |
| 205 | 205 |
| 206 ScrollbarPart m_hoveredPart; | 206 ScrollbarPart m_hoveredPart; |
| 207 ScrollbarPart m_pressedPart; | 207 ScrollbarPart m_pressedPart; |
| 208 int m_pressedPos; | 208 int m_pressedPos; |
| 209 float m_scrollPos; | 209 float m_scrollPos; |
| (...skipping 19 matching lines...) Expand all Loading... |
| 229 | 229 |
| 230 bool m_trackNeedsRepaint; | 230 bool m_trackNeedsRepaint; |
| 231 bool m_thumbNeedsRepaint; | 231 bool m_thumbNeedsRepaint; |
| 232 }; | 232 }; |
| 233 | 233 |
| 234 DEFINE_TYPE_CASTS(Scrollbar, Widget, widget, widget->isScrollbar(), widget.isScr
ollbar()); | 234 DEFINE_TYPE_CASTS(Scrollbar, Widget, widget, widget->isScrollbar(), widget.isScr
ollbar()); |
| 235 | 235 |
| 236 } // namespace blink | 236 } // namespace blink |
| 237 | 237 |
| 238 #endif // Scrollbar_h | 238 #endif // Scrollbar_h |
| OLD | NEW |