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 "bindings/core/v8/ExceptionState.h" | 8 #include "bindings/core/v8/ExceptionState.h" |
9 #include "bindings/core/v8/ScriptWrappable.h" | 9 #include "bindings/core/v8/ScriptWrappable.h" |
10 #include "core/CoreExport.h" | 10 #include "core/CoreExport.h" |
11 #include "core/dom/Element.h" | |
12 #include "core/page/scrolling/ScrollStateInit.h" | 11 #include "core/page/scrolling/ScrollStateInit.h" |
13 #include "platform/scroll/ScrollStateData.h" | 12 #include "platform/scroll/ScrollStateData.h" |
| 13 #include "wtf/Forward.h" |
14 #include <deque> | 14 #include <deque> |
15 | 15 |
16 namespace blink { | 16 namespace blink { |
17 | 17 |
| 18 class Element; |
| 19 |
18 class CORE_EXPORT ScrollState final : public GarbageCollectedFinalized<ScrollSta
te>, public ScriptWrappable { | 20 class CORE_EXPORT ScrollState final : public GarbageCollectedFinalized<ScrollSta
te>, public ScriptWrappable { |
19 DEFINE_WRAPPERTYPEINFO(); | 21 DEFINE_WRAPPERTYPEINFO(); |
20 | 22 |
21 public: | 23 public: |
22 static ScrollState* create(ScrollStateInit); | 24 static ScrollState* create(ScrollStateInit); |
23 static ScrollState* create(PassOwnPtr<ScrollStateData>); | 25 static ScrollState* create(PassOwnPtr<ScrollStateData>); |
24 | 26 |
25 ~ScrollState() | 27 ~ScrollState() |
26 { | 28 { |
27 } | 29 } |
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
83 { | 85 { |
84 return !m_data->delta_x && !m_data->delta_y && !m_data->is_ending && !m_
data->is_beginning; | 86 return !m_data->delta_x && !m_data->delta_y && !m_data->is_ending && !m_
data->is_beginning; |
85 } | 87 } |
86 | 88 |
87 ScrollStateData* data() const { return m_data.get(); } | 89 ScrollStateData* data() const { return m_data.get(); } |
88 | 90 |
89 DEFINE_INLINE_TRACE() {} | 91 DEFINE_INLINE_TRACE() {} |
90 | 92 |
91 private: | 93 private: |
92 ScrollState(); | 94 ScrollState(); |
93 ScrollState(PassOwnPtr<ScrollStateData>); | 95 explicit ScrollState(PassOwnPtr<ScrollStateData>); |
94 PassOwnPtr<ScrollStateData> m_data; | 96 |
| 97 OwnPtr<ScrollStateData> m_data; |
95 std::deque<int> m_scrollChain; | 98 std::deque<int> m_scrollChain; |
96 }; | 99 }; |
97 | 100 |
98 } // namespace blink | 101 } // namespace blink |
99 | 102 |
100 #endif // ScrollState_h | 103 #endif // ScrollState_h |
OLD | NEW |