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

Unified Diff: ash/metrics/pointer_metrics_recorder.h

Issue 2331093002: UMA stats for stylus usage (Closed)
Patch Set: Changed ash/BUILD.gn Created 4 years, 3 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
Index: ash/metrics/pointer_metrics_recorder.h
diff --git a/ash/metrics/pointer_metrics_recorder.h b/ash/metrics/pointer_metrics_recorder.h
new file mode 100644
index 0000000000000000000000000000000000000000..82421069e7ccbdd007179c0e463d321371f3f037
--- /dev/null
+++ b/ash/metrics/pointer_metrics_recorder.h
@@ -0,0 +1,38 @@
+// Copyright 2016 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 UI_ASH_METRICS_POINTER_METRICS_RECORDER_H_
+#define UI_ASH_METRICS_POINTER_METRICS_RECORDER_H_
+
+#include "base/macros.h"
+#include "ui/views/pointer_watcher.h"
+
+namespace gfx {
+class Point;
+}
+
+namespace ui {
+class PointerEvent;
+}
+
+namespace ash {
sky 2016/09/27 22:08:59 Please move this class to ash/common/metrics. Add
xiaoyinh(OOO Sep 11-29) 2016/09/29 20:37:43 Done. Also added SetAppType() in WmWindow so that
+
+// A metrics recorder that records pointer related metrics.
+class PointerMetricsRecorder : public views::PointerWatcher {
+ public:
+ PointerMetricsRecorder();
+ ~PointerMetricsRecorder() override;
+
+ // views::PointerWatcher:
+ void OnPointerEventObserved(const ui::PointerEvent& event,
+ const gfx::Point& location_in_screen,
+ views::Widget* target) override;
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(PointerMetricsRecorder);
+};
+
+} // namespace ash
+
+#endif // UI_ASH_METRICS_POINTER_METRICS_RECORDER_H_

Powered by Google App Engine
This is Rietveld 408576698