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

Unified Diff: cc/input/scroller_size.h

Issue 2773893003: Record size of scroller that user scrolls (Closed)
Patch Set: Address comments && add unit tests Created 3 years, 8 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 | « no previous file | cc/trees/layer_tree_host_impl.cc » ('j') | cc/trees/layer_tree_host_impl.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/input/scroller_size.h
diff --git a/cc/input/scroller_size.h b/cc/input/scroller_size.h
new file mode 100644
index 0000000000000000000000000000000000000000..f1fcca99249acd4127f14ed6d8347307f019c0e2
--- /dev/null
+++ b/cc/input/scroller_size.h
@@ -0,0 +1,16 @@
+// Copyright 2017 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef CC_INPUT_SCROLLER_SIZE_H_
pdr. 2017/04/19 21:03:50 Nit: scroller_size_metrics.h?
yigu 2017/04/20 18:14:22 Done.
+#define CC_INPUT_SCROLLER_SIZE_H_
+
+namespace cc {
+
+// Use the two constants to add scroller size related UMA metrics.
+static constexpr int kMaxScrollerSize = 200000; // Approximately 400px * 500px
pdr. 2017/04/19 21:03:50 I don't understand what this constant is for. Why
yigu 2017/04/19 21:10:05 We are about to use the metrics and other stuff to
pdr. 2017/04/19 21:13:47 Can you add that as a comment above the constant?
flackr 2017/04/20 07:15:01 Also max scroller size sounds a bit misleading. Ma
yigu 2017/04/20 18:14:22 Done.
+static constexpr int kScrollerSizeBucketCount = 50;
+
+} // namespace cc
+
+#endif // CC_INPUT_SCROLLER_SIZE_H_
« no previous file with comments | « no previous file | cc/trees/layer_tree_host_impl.cc » ('j') | cc/trees/layer_tree_host_impl.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698