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 <memory> | 8 #include <memory> |
9 | 9 |
10 #include "base/macros.h" | 10 #include "base/macros.h" |
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
103 WHEEL, | 103 WHEEL, |
104 NON_BUBBLING_GESTURE | 104 NON_BUBBLING_GESTURE |
105 }; | 105 }; |
106 | 106 |
107 enum class TouchStartEventListenerType { | 107 enum class TouchStartEventListenerType { |
108 NO_HANDLER, | 108 NO_HANDLER, |
109 HANDLER, | 109 HANDLER, |
110 HANDLER_ON_SCROLLING_LAYER | 110 HANDLER_ON_SCROLLING_LAYER |
111 }; | 111 }; |
112 | 112 |
113 struct ScrollSourceInfo { | |
114 enum : uint32_t { | |
danakj
2017/03/10 20:52:48
Why do you specify the storage type?
sahel
2017/03/13 20:13:43
Done, I made it uint8_t to address the
feedback ab
| |
115 NONE = 0, | |
116 SCROLLED_BY_TOUCH = 1 << 0, | |
117 SCROLLED_BY_WHEEL = 1 << 1, | |
118 }; | |
119 }; | |
120 | |
113 // Binds a client to this handler to receive notifications. Only one client | 121 // Binds a client to this handler to receive notifications. Only one client |
114 // can be bound to an InputHandler. The client must live at least until the | 122 // can be bound to an InputHandler. The client must live at least until the |
115 // handler calls WillShutdown() on the client. | 123 // handler calls WillShutdown() on the client. |
116 virtual void BindToClient(InputHandlerClient* client) = 0; | 124 virtual void BindToClient(InputHandlerClient* client) = 0; |
117 | 125 |
118 // Selects a layer to be scrolled using the |scroll_state| start position. | 126 // Selects a layer to be scrolled using the |scroll_state| start position. |
119 // Returns SCROLL_STARTED if the layer at the coordinates can be scrolled, | 127 // Returns SCROLL_STARTED if the layer at the coordinates can be scrolled, |
120 // SCROLL_ON_MAIN_THREAD if the scroll event should instead be delegated to | 128 // SCROLL_ON_MAIN_THREAD if the scroll event should instead be delegated to |
121 // the main thread, or SCROLL_IGNORED if there is nothing to be scrolled at | 129 // the main thread, or SCROLL_IGNORED if there is nothing to be scrolled at |
122 // the given coordinates. | 130 // the given coordinates. |
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
220 InputHandler() {} | 228 InputHandler() {} |
221 virtual ~InputHandler() {} | 229 virtual ~InputHandler() {} |
222 | 230 |
223 private: | 231 private: |
224 DISALLOW_COPY_AND_ASSIGN(InputHandler); | 232 DISALLOW_COPY_AND_ASSIGN(InputHandler); |
225 }; | 233 }; |
226 | 234 |
227 } // namespace cc | 235 } // namespace cc |
228 | 236 |
229 #endif // CC_INPUT_INPUT_HANDLER_H_ | 237 #endif // CC_INPUT_INPUT_HANDLER_H_ |
OLD | NEW |