| 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 21 matching lines...) Expand all Loading... |
| 32 #include "platform/heap/Handle.h" | 32 #include "platform/heap/Handle.h" |
| 33 #include "platform/scroll/ScrollTypes.h" | 33 #include "platform/scroll/ScrollTypes.h" |
| 34 #include "platform/scroll/ScrollbarThemeClient.h" | 34 #include "platform/scroll/ScrollbarThemeClient.h" |
| 35 #include "wtf/MathExtras.h" | 35 #include "wtf/MathExtras.h" |
| 36 | 36 |
| 37 namespace blink { | 37 namespace blink { |
| 38 | 38 |
| 39 class GraphicsContext; | 39 class GraphicsContext; |
| 40 class HostWindow; | 40 class HostWindow; |
| 41 class IntRect; | 41 class IntRect; |
| 42 class PlatformGestureEvent; | |
| 43 class PlatformMouseEvent; | 42 class PlatformMouseEvent; |
| 44 class ScrollableArea; | 43 class ScrollableArea; |
| 45 class ScrollbarTheme; | 44 class ScrollbarTheme; |
| 45 class WebGestureEvent; |
| 46 | 46 |
| 47 class PLATFORM_EXPORT Scrollbar : public Widget, | 47 class PLATFORM_EXPORT Scrollbar : public Widget, |
| 48 public ScrollbarThemeClient, | 48 public ScrollbarThemeClient, |
| 49 public DisplayItemClient { | 49 public DisplayItemClient { |
| 50 public: | 50 public: |
| 51 static Scrollbar* create(ScrollableArea* scrollableArea, | 51 static Scrollbar* create(ScrollableArea* scrollableArea, |
| 52 ScrollbarOrientation orientation, | 52 ScrollbarOrientation orientation, |
| 53 ScrollbarControlSize size, | 53 ScrollbarControlSize size, |
| 54 HostWindow* hostWindow) { | 54 HostWindow* hostWindow) { |
| 55 return new Scrollbar(scrollableArea, orientation, size, hostWindow); | 55 return new Scrollbar(scrollableArea, orientation, size, hostWindow); |
| (...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 131 void paint(GraphicsContext&, const CullRect&) const final; | 131 void paint(GraphicsContext&, const CullRect&) const final; |
| 132 | 132 |
| 133 bool isOverlayScrollbar() const override; | 133 bool isOverlayScrollbar() const override; |
| 134 bool shouldParticipateInHitTesting(); | 134 bool shouldParticipateInHitTesting(); |
| 135 | 135 |
| 136 bool isWindowActive() const; | 136 bool isWindowActive() const; |
| 137 | 137 |
| 138 // Return if the gesture event was handled. |shouldUpdateCapture| | 138 // Return if the gesture event was handled. |shouldUpdateCapture| |
| 139 // will be set to true if the handler should update the capture | 139 // will be set to true if the handler should update the capture |
| 140 // state for this scrollbar. | 140 // state for this scrollbar. |
| 141 bool gestureEvent(const PlatformGestureEvent&, bool* shouldUpdateCapture); | 141 bool gestureEvent(const WebGestureEvent&, bool* shouldUpdateCapture); |
| 142 | 142 |
| 143 // These methods are used for platform scrollbars to give :hover feedback. | 143 // These methods are used for platform scrollbars to give :hover feedback. |
| 144 // They will not get called when the mouse went down in a scrollbar, since it | 144 // They will not get called when the mouse went down in a scrollbar, since it |
| 145 // is assumed the scrollbar will start | 145 // is assumed the scrollbar will start |
| 146 // grabbing all events in that case anyway. | 146 // grabbing all events in that case anyway. |
| 147 void mouseMoved(const PlatformMouseEvent&); | 147 void mouseMoved(const PlatformMouseEvent&); |
| 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 |
| (...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 258 | 258 |
| 259 DEFINE_TYPE_CASTS(Scrollbar, | 259 DEFINE_TYPE_CASTS(Scrollbar, |
| 260 Widget, | 260 Widget, |
| 261 widget, | 261 widget, |
| 262 widget->isScrollbar(), | 262 widget->isScrollbar(), |
| 263 widget.isScrollbar()); | 263 widget.isScrollbar()); |
| 264 | 264 |
| 265 } // namespace blink | 265 } // namespace blink |
| 266 | 266 |
| 267 #endif // Scrollbar_h | 267 #endif // Scrollbar_h |
| OLD | NEW |