Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(667)

Side by Side Diff: cc/input/input_handler.h

Issue 2737653004: UMA metrics for use count of wheel and touch scrolls. (Closed)
Patch Set: layouttest updated. Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | cc/test/layer_tree_test.cc » ('j') | cc/trees/layer_tree_host.cc » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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 ScrollSourceInfo {
114 NONE,
115 SCROLLED_BY_TOUCH,
bokan 2017/03/09 17:31:03 Make this a bitfield. i.e. SCROLLED_BY_TOUCH = 0x1
sahel 2017/03/10 16:21:33 Done.
116 SCROLLED_BY_WHEEL,
117 SCROLLED_BY_TOUCH_AND_WHEEL,
118 };
119
113 // Binds a client to this handler to receive notifications. Only one client 120 // 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 121 // can be bound to an InputHandler. The client must live at least until the
115 // handler calls WillShutdown() on the client. 122 // handler calls WillShutdown() on the client.
116 virtual void BindToClient(InputHandlerClient* client) = 0; 123 virtual void BindToClient(InputHandlerClient* client) = 0;
117 124
118 // Selects a layer to be scrolled using the |scroll_state| start position. 125 // 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, 126 // 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 127 // 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 128 // the main thread, or SCROLL_IGNORED if there is nothing to be scrolled at
122 // the given coordinates. 129 // the given coordinates.
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after
220 InputHandler() {} 227 InputHandler() {}
221 virtual ~InputHandler() {} 228 virtual ~InputHandler() {}
222 229
223 private: 230 private:
224 DISALLOW_COPY_AND_ASSIGN(InputHandler); 231 DISALLOW_COPY_AND_ASSIGN(InputHandler);
225 }; 232 };
226 233
227 } // namespace cc 234 } // namespace cc
228 235
229 #endif // CC_INPUT_INPUT_HANDLER_H_ 236 #endif // CC_INPUT_INPUT_HANDLER_H_
OLDNEW
« no previous file with comments | « no previous file | cc/test/layer_tree_test.cc » ('j') | cc/trees/layer_tree_host.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698