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

Unified Diff: cc/trees/layer_tree_host_impl.h

Issue 2737653004: UMA metrics for use count of wheel and touch scrolls. (Closed)
Patch Set: TODO for GRC usage added. 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « cc/trees/layer_tree_host_common.cc ('k') | cc/trees/layer_tree_host_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/trees/layer_tree_host_impl.h
diff --git a/cc/trees/layer_tree_host_impl.h b/cc/trees/layer_tree_host_impl.h
index f02a36c93d9f84b42c6df08717ce4986ccd47332..cdfcdab72acf07a235664db3eafcc88c74116d3b 100644
--- a/cc/trees/layer_tree_host_impl.h
+++ b/cc/trees/layer_tree_host_impl.h
@@ -707,6 +707,14 @@ class CC_EXPORT LayerTreeHostImpl
void ImageDecodeFinished(const base::Callback<void(bool)>& embedder_callback,
bool decode_succeeded);
+ // This function keeps track of sources of scrolls that are handled in the
+ // compositor side. The information gets shared by the main thread as part of
+ // the begin_main_frame_state. Finally Use counters are updated in the main
+ // thread side to keep track of the frequency of scrolling with different
+ // sources per page load. TODO(crbug.com/691886): Use GRC API to plumb the
+ // scroll source info for Use Counters.
+ void UpdateScrollSourceInfo(bool is_wheel_scroll);
+
using UIResourceMap = std::unordered_map<UIResourceId, UIResourceData>;
UIResourceMap ui_resource_map_;
@@ -853,6 +861,11 @@ class CC_EXPORT LayerTreeHostImpl
// begin main frame. These callbacks must only be called on the main thread.
std::vector<base::Closure> completed_image_decode_callbacks_;
+ // These are used to transfer usage of touch and wheel scrolls to the main
+ // thread.
+ bool has_scrolled_by_wheel_;
+ bool has_scrolled_by_touch_;
+
DISALLOW_COPY_AND_ASSIGN(LayerTreeHostImpl);
};
« no previous file with comments | « cc/trees/layer_tree_host_common.cc ('k') | cc/trees/layer_tree_host_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698