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

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

Issue 2737653004: UMA metrics for use count of wheel and touch scrolls. (Closed)
Patch Set: use of fieldbit instead of normal enum 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 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
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_
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