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

Unified Diff: ash/wm/stylus_metrics_recorder.h

Issue 2270173002: add stylus metrics (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: incorporate comments and rebase Created 4 years, 4 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/wm/stylus_metrics_recorder.h
diff --git a/ash/wm/stylus_metrics_recorder.h b/ash/wm/stylus_metrics_recorder.h
new file mode 100644
index 0000000000000000000000000000000000000000..f23c6654dd76f7ab07d1207925fe529ddf01b7dc
--- /dev/null
+++ b/ash/wm/stylus_metrics_recorder.h
@@ -0,0 +1,33 @@
+// 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 ASH_WM_STYLUS_METRICS_RECORDER_H_
+#define ASH_WM_STYLUS_METRICS_RECORDER_H_
+
+#include <memory>
+
+#include "base/macros.h"
+#include "ui/events/event_handler.h"
+
+namespace ash {
+
+// An event recorder that record stylus related metrics.
+class StylusMetricsRecorder : public ui::EventHandler {
+ public:
+ StylusMetricsRecorder();
+ ~StylusMetricsRecorder() override;
+
+ // ui::EventHandler:
+ void OnMouseEvent(ui::MouseEvent* event) override;
+ void OnTouchEvent(ui::TouchEvent* event) override;
+
+ private:
+ void RecordUMA(ui::EventPointerType type);
+
+ DISALLOW_COPY_AND_ASSIGN(StylusMetricsRecorder);
+};
+
+} // namespace ash
+
+#endif // ASH_WM_STYLUS_METRICS_RECORDER_H_

Powered by Google App Engine
This is Rietveld 408576698