Chromium Code Reviews| 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 enum class InputHandlerState { | |
|
dtapuska
2017/04/27 16:24:44
This name seems a bit too generic.
chongz
2017/04/27 19:12:14
Changed to READY_FOR_INPUT and BUSY_INSIDE_IMPL_FR
chongz
2017/04/28 19:21:21
Changed enum name to |ImplThreadPhase|.
| |
| 114 IDLE, | |
| 115 INSIDE_IMPL_FRAME, | |
| 116 }; | |
| 117 | |
| 113 // Binds a client to this handler to receive notifications. Only one client | 118 // 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 | 119 // can be bound to an InputHandler. The client must live at least until the |
| 115 // handler calls WillShutdown() on the client. | 120 // handler calls WillShutdown() on the client. |
| 116 virtual void BindToClient(InputHandlerClient* client, | 121 virtual void BindToClient(InputHandlerClient* client, |
| 117 bool wheel_scroll_latching_enabled) = 0; | 122 bool wheel_scroll_latching_enabled) = 0; |
| 118 | 123 |
| 124 // |InputHandlerClient| should avoid delivering input events during | |
| 125 // |INSIDE_IMPL_FRAME| to reduce checkerboard issue. | |
| 126 virtual InputHandlerState GetInputHandlerState() const = 0; | |
| 127 | |
| 119 // Selects a layer to be scrolled using the |scroll_state| start position. | 128 // Selects a layer to be scrolled using the |scroll_state| start position. |
| 120 // Returns SCROLL_STARTED if the layer at the coordinates can be scrolled, | 129 // Returns SCROLL_STARTED if the layer at the coordinates can be scrolled, |
| 121 // SCROLL_ON_MAIN_THREAD if the scroll event should instead be delegated to | 130 // SCROLL_ON_MAIN_THREAD if the scroll event should instead be delegated to |
| 122 // the main thread, or SCROLL_IGNORED if there is nothing to be scrolled at | 131 // the main thread, or SCROLL_IGNORED if there is nothing to be scrolled at |
| 123 // the given coordinates. | 132 // the given coordinates. |
| 124 virtual ScrollStatus ScrollBegin(ScrollState* scroll_state, | 133 virtual ScrollStatus ScrollBegin(ScrollState* scroll_state, |
| 125 ScrollInputType type) = 0; | 134 ScrollInputType type) = 0; |
| 126 | 135 |
| 127 // Similar to ScrollBegin, except the hit test is skipped and scroll always | 136 // Similar to ScrollBegin, except the hit test is skipped and scroll always |
| 128 // targets at the root layer. | 137 // targets at the root layer. |
| (...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 223 InputHandler() {} | 232 InputHandler() {} |
| 224 virtual ~InputHandler() {} | 233 virtual ~InputHandler() {} |
| 225 | 234 |
| 226 private: | 235 private: |
| 227 DISALLOW_COPY_AND_ASSIGN(InputHandler); | 236 DISALLOW_COPY_AND_ASSIGN(InputHandler); |
| 228 }; | 237 }; |
| 229 | 238 |
| 230 } // namespace cc | 239 } // namespace cc |
| 231 | 240 |
| 232 #endif // CC_INPUT_INPUT_HANDLER_H_ | 241 #endif // CC_INPUT_INPUT_HANDLER_H_ |
| OLD | NEW |