| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef WebScrollbarBehavior_h | 5 #ifndef WebScrollbarBehavior_h |
| 6 #define WebScrollbarBehavior_h | 6 #define WebScrollbarBehavior_h |
| 7 | 7 |
| 8 #include "WebPointerProperties.h" | |
| 9 | |
| 10 namespace blink { | 8 namespace blink { |
| 11 | 9 |
| 12 struct WebPoint; | 10 struct WebPoint; |
| 13 struct WebRect; | 11 struct WebRect; |
| 14 | 12 |
| 15 class WebScrollbarBehavior { | 13 class WebScrollbarBehavior { |
| 16 public: | 14 public: |
| 15 enum Button { |
| 16 ButtonNone = -1, |
| 17 ButtonLeft, |
| 18 ButtonMiddle, |
| 19 ButtonRight |
| 20 }; |
| 17 virtual ~WebScrollbarBehavior() { } | 21 virtual ~WebScrollbarBehavior() { } |
| 18 virtual bool shouldCenterOnThumb(WebPointerProperties::Button, bool shiftKey
Pressed, bool altKeyPressed) { return false; } | 22 virtual bool shouldCenterOnThumb(Button, bool shiftKeyPressed, bool altKeyPr
essed) { return false; } |
| 19 virtual bool shouldSnapBackToDragOrigin(const WebPoint& eventPoint, const We
bRect& scrollbarRect, bool isHorizontal) { return false; } | 23 virtual bool shouldSnapBackToDragOrigin(const WebPoint& eventPoint, const We
bRect& scrollbarRect, bool isHorizontal) { return false; } |
| 20 }; | 24 }; |
| 21 | 25 |
| 22 } // namespace blink | 26 } // namespace blink |
| 23 | 27 |
| 24 #endif | 28 #endif |
| OLD | NEW |