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

Unified Diff: ash/common/metrics/pointer_metrics_recorder.h

Issue 2331093002: UMA stats for stylus usage (Closed)
Patch Set: nit and rebase 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
« no previous file with comments | « ash/aura/wm_window_aura.cc ('k') | ash/common/metrics/pointer_metrics_recorder.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/common/metrics/pointer_metrics_recorder.h
diff --git a/ash/common/metrics/pointer_metrics_recorder.h b/ash/common/metrics/pointer_metrics_recorder.h
new file mode 100644
index 0000000000000000000000000000000000000000..bf19e9098fcb41b9124a414c59cb69b89191a339
--- /dev/null
+++ b/ash/common/metrics/pointer_metrics_recorder.h
@@ -0,0 +1,39 @@
+// 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_COMMON_METRICS_POINTER_METRICS_RECORDER_H_
+#define UI_ASH_COMMON_METRICS_POINTER_METRICS_RECORDER_H_
+
+#include "ash/ash_export.h"
+#include "base/macros.h"
+#include "ui/views/pointer_watcher.h"
+
+namespace gfx {
+class Point;
+}
+
+namespace ui {
+class PointerEvent;
+}
+
+namespace ash {
+
+// A metrics recorder that records pointer related metrics.
+class ASH_EXPORT 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_COMMON_METRICS_POINTER_METRICS_RECORDER_H_
« no previous file with comments | « ash/aura/wm_window_aura.cc ('k') | ash/common/metrics/pointer_metrics_recorder.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698