OLD | NEW |
1 // Copyright 2011 The Chromium Authors. All rights reserved. | 1 // Copyright 2011 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 CC_INPUT_INPUT_HANDLER_H_ | 5 #ifndef CC_INPUT_INPUT_HANDLER_H_ |
6 #define CC_INPUT_INPUT_HANDLER_H_ | 6 #define CC_INPUT_INPUT_HANDLER_H_ |
7 | 7 |
8 #include "base/macros.h" | 8 #include "base/macros.h" |
9 #include "base/memory/scoped_ptr.h" | 9 #include "base/memory/scoped_ptr.h" |
10 #include "base/time/time.h" | 10 #include "base/time/time.h" |
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
100 SCROLL_BAR_SCROLLING = 1 << 3, | 100 SCROLL_BAR_SCROLLING = 1 << 3, |
101 PAGE_OVERLAY = 1 << 4, | 101 PAGE_OVERLAY = 1 << 4, |
102 MaxNonTransientScrollingReason = PAGE_OVERLAY, | 102 MaxNonTransientScrollingReason = PAGE_OVERLAY, |
103 NON_FAST_SCROLLABLE_REGION = 1 << 5, | 103 NON_FAST_SCROLLABLE_REGION = 1 << 5, |
104 EVENT_HANDLERS = 1 << 6, | 104 EVENT_HANDLERS = 1 << 6, |
105 FAILED_HIT_TEST = 1 << 7, | 105 FAILED_HIT_TEST = 1 << 7, |
106 NO_SCROLLING_LAYER = 1 << 8, | 106 NO_SCROLLING_LAYER = 1 << 8, |
107 NOT_SCROLLABLE = 1 << 9, | 107 NOT_SCROLLABLE = 1 << 9, |
108 CONTINUING_MAIN_THREAD_SCROLL = 1 << 10, | 108 CONTINUING_MAIN_THREAD_SCROLL = 1 << 10, |
109 NON_INVERTIBLE_TRANSFORM = 1 << 11, | 109 NON_INVERTIBLE_TRANSFORM = 1 << 11, |
110 MainThreadScrollingReasonCount = 13 | 110 PAGE_BASED_SCROLLING = 1 << 12, |
| 111 MainThreadScrollingReasonCount = 14 |
111 }; | 112 }; |
112 | 113 |
113 struct ScrollStatus { | 114 struct ScrollStatus { |
114 ScrollStatus() | 115 ScrollStatus() |
115 : thread(SCROLL_ON_IMPL_THREAD), | 116 : thread(SCROLL_ON_IMPL_THREAD), |
116 main_thread_scrolling_reasons(NOT_SCROLLING_ON_MAIN) {} | 117 main_thread_scrolling_reasons(NOT_SCROLLING_ON_MAIN) {} |
117 ScrollStatus(ScrollThread thread, | 118 ScrollStatus(ScrollThread thread, |
118 MainThreadScrollingReason main_thread_scrolling_reasons) | 119 MainThreadScrollingReason main_thread_scrolling_reasons) |
119 : thread(thread), | 120 : thread(thread), |
120 main_thread_scrolling_reasons(main_thread_scrolling_reasons) {} | 121 main_thread_scrolling_reasons(main_thread_scrolling_reasons) {} |
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
221 inline const InputHandler::MainThreadScrollingReason& operator|=( | 222 inline const InputHandler::MainThreadScrollingReason& operator|=( |
222 InputHandler::MainThreadScrollingReason& a, | 223 InputHandler::MainThreadScrollingReason& a, |
223 InputHandler::MainThreadScrollingReason b) { | 224 InputHandler::MainThreadScrollingReason b) { |
224 return a = static_cast<InputHandler::MainThreadScrollingReason>( | 225 return a = static_cast<InputHandler::MainThreadScrollingReason>( |
225 static_cast<unsigned>(a) | static_cast<unsigned>(b)); | 226 static_cast<unsigned>(a) | static_cast<unsigned>(b)); |
226 } | 227 } |
227 | 228 |
228 } // namespace cc | 229 } // namespace cc |
229 | 230 |
230 #endif // CC_INPUT_INPUT_HANDLER_H_ | 231 #endif // CC_INPUT_INPUT_HANDLER_H_ |
OLD | NEW |