| 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 18 matching lines...) Expand all Loading... |
| 29 #include "platform/FrameViewBase.h" | 29 #include "platform/FrameViewBase.h" |
| 30 #include "platform/Timer.h" | 30 #include "platform/Timer.h" |
| 31 #include "platform/graphics/paint/DisplayItem.h" | 31 #include "platform/graphics/paint/DisplayItem.h" |
| 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 "platform/wtf/MathExtras.h" | 35 #include "platform/wtf/MathExtras.h" |
| 36 | 36 |
| 37 namespace blink { | 37 namespace blink { |
| 38 | 38 |
| 39 class CullRect; |
| 39 class GraphicsContext; | 40 class GraphicsContext; |
| 40 class HostWindow; | 41 class HostWindow; |
| 41 class IntRect; | 42 class IntRect; |
| 42 class ScrollableArea; | 43 class ScrollableArea; |
| 43 class ScrollbarTheme; | 44 class ScrollbarTheme; |
| 44 class WebGestureEvent; | 45 class WebGestureEvent; |
| 45 class WebMouseEvent; | 46 class WebMouseEvent; |
| 46 | 47 |
| 47 class PLATFORM_EXPORT Scrollbar : public FrameViewBase, | 48 class PLATFORM_EXPORT Scrollbar : public FrameViewBase, |
| 48 public ScrollbarThemeClient, | 49 public ScrollbarThemeClient, |
| (...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 122 ScrollableArea* GetScrollableArea() const { return scrollable_area_; } | 123 ScrollableArea* GetScrollableArea() const { return scrollable_area_; } |
| 123 | 124 |
| 124 int PressedPos() const { return pressed_pos_; } | 125 int PressedPos() const { return pressed_pos_; } |
| 125 | 126 |
| 126 virtual void SetHoveredPart(ScrollbarPart); | 127 virtual void SetHoveredPart(ScrollbarPart); |
| 127 virtual void SetPressedPart(ScrollbarPart); | 128 virtual void SetPressedPart(ScrollbarPart); |
| 128 | 129 |
| 129 void SetProportion(int visible_size, int total_size); | 130 void SetProportion(int visible_size, int total_size); |
| 130 void SetPressedPos(int p) { pressed_pos_ = p; } | 131 void SetPressedPos(int p) { pressed_pos_ = p; } |
| 131 | 132 |
| 132 void Paint(GraphicsContext&, const CullRect&) const final; | 133 void Paint(GraphicsContext&, const CullRect&) const; |
| 133 | 134 |
| 134 bool IsOverlayScrollbar() const override; | 135 bool IsOverlayScrollbar() const override; |
| 135 bool ShouldParticipateInHitTesting(); | 136 bool ShouldParticipateInHitTesting(); |
| 136 | 137 |
| 137 bool IsWindowActive() const; | 138 bool IsWindowActive() const; |
| 138 | 139 |
| 139 // Return if the gesture event was handled. |shouldUpdateCapture| | 140 // Return if the gesture event was handled. |shouldUpdateCapture| |
| 140 // will be set to true if the handler should update the capture | 141 // will be set to true if the handler should update the capture |
| 141 // state for this scrollbar. | 142 // state for this scrollbar. |
| 142 bool GestureEvent(const WebGestureEvent&, bool* should_update_capture); | 143 bool GestureEvent(const WebGestureEvent&, bool* should_update_capture); |
| (...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 262 | 263 |
| 263 DEFINE_TYPE_CASTS(Scrollbar, | 264 DEFINE_TYPE_CASTS(Scrollbar, |
| 264 FrameViewBase, | 265 FrameViewBase, |
| 265 frameViewBase, | 266 frameViewBase, |
| 266 frameViewBase->IsScrollbar(), | 267 frameViewBase->IsScrollbar(), |
| 267 frameViewBase.IsScrollbar()); | 268 frameViewBase.IsScrollbar()); |
| 268 | 269 |
| 269 } // namespace blink | 270 } // namespace blink |
| 270 | 271 |
| 271 #endif // Scrollbar_h | 272 #endif // Scrollbar_h |
| OLD | NEW |