| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 ScrollState_h | 5 #ifndef ScrollState_h |
| 6 #define ScrollState_h | 6 #define ScrollState_h |
| 7 | 7 |
| 8 #include <deque> | 8 #include <deque> |
| 9 #include <memory> | 9 #include <memory> |
| 10 #include "bindings/core/v8/ExceptionState.h" | 10 #include "bindings/core/v8/ExceptionState.h" |
| (...skipping 25 matching lines...) Expand all Loading... |
| 36 void consumeDelta(double x, double y, ExceptionState&); | 36 void consumeDelta(double x, double y, ExceptionState&); |
| 37 // Pops the first element off of |m_scrollChain| and calls |distributeScroll| | 37 // Pops the first element off of |m_scrollChain| and calls |distributeScroll| |
| 38 // on it. | 38 // on it. |
| 39 void distributeToScrollChainDescendant(); | 39 void distributeToScrollChainDescendant(); |
| 40 int positionX() { return data_->position_x; }; | 40 int positionX() { return data_->position_x; }; |
| 41 int positionY() { return data_->position_y; }; | 41 int positionY() { return data_->position_y; }; |
| 42 // Positive when scrolling right. | 42 // Positive when scrolling right. |
| 43 double deltaX() const { return data_->delta_x; }; | 43 double deltaX() const { return data_->delta_x; }; |
| 44 // Positive when scrolling down. | 44 // Positive when scrolling down. |
| 45 double deltaY() const { return data_->delta_y; }; | 45 double deltaY() const { return data_->delta_y; }; |
| 46 // Positive when scrolling right. |
| 47 double deltaXHint() const { return data_->delta_x_hint; }; |
| 48 // Positive when scrolling down. |
| 49 double deltaYHint() const { return data_->delta_y_hint; }; |
| 50 // Indicates whether delta hints should be ignored while handling GSB or not. |
| 51 bool ignoreDeltaHints() const { return data_->ignore_delta_hints; }; |
| 46 // Indicates the smallest delta the input device can produce. 0 for | 52 // Indicates the smallest delta the input device can produce. 0 for |
| 47 // unquantized inputs. | 53 // unquantized inputs. |
| 48 double deltaGranularity() const { return data_->delta_granularity; }; | 54 double deltaGranularity() const { return data_->delta_granularity; }; |
| 49 // Positive if moving right. | 55 // Positive if moving right. |
| 50 double velocityX() const { return data_->velocity_x; }; | 56 double velocityX() const { return data_->velocity_x; }; |
| 51 // Positive if moving down. | 57 // Positive if moving down. |
| 52 double velocityY() const { return data_->velocity_y; }; | 58 double velocityY() const { return data_->velocity_y; }; |
| 53 // True for events dispatched after the users's gesture has finished. | 59 // True for events dispatched after the users's gesture has finished. |
| 54 bool inInertialPhase() const { return data_->is_in_inertial_phase; }; | 60 bool inInertialPhase() const { return data_->is_in_inertial_phase; }; |
| 55 // True if this is the first event for this scroll. | 61 // True if this is the first event for this scroll. |
| (...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 95 explicit ScrollState(std::unique_ptr<ScrollStateData>); | 101 explicit ScrollState(std::unique_ptr<ScrollStateData>); |
| 96 | 102 |
| 97 std::unique_ptr<ScrollStateData> data_; | 103 std::unique_ptr<ScrollStateData> data_; |
| 98 std::deque<int> scroll_chain_; | 104 std::deque<int> scroll_chain_; |
| 99 Member<Element> element_; | 105 Member<Element> element_; |
| 100 }; | 106 }; |
| 101 | 107 |
| 102 } // namespace blink | 108 } // namespace blink |
| 103 | 109 |
| 104 #endif // ScrollState_h | 110 #endif // ScrollState_h |
| OLD | NEW |