Chromium Code Reviews| 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..f31ebb5196736009a5d72e992fe820004ec7de6a |
| --- /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; |
| + |
| + // Overridden from ui::EventHandler: |
|
oshima
2016/08/23 21:40:57
nit: // ui::EventHandler:
xiaoyinh(OOO Sep 11-29)
2016/08/23 22:43:01
Done.
|
| + 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_ |