Index: chrome/browser/ui/ash/metrics/stylus_metrics_recorder_chromeos.h |
diff --git a/chrome/browser/ui/ash/metrics/stylus_metrics_recorder_chromeos.h b/chrome/browser/ui/ash/metrics/stylus_metrics_recorder_chromeos.h |
new file mode 100644 |
index 0000000000000000000000000000000000000000..d5960b6bab575b4a4728000e3548baa562af3791 |
--- /dev/null |
+++ b/chrome/browser/ui/ash/metrics/stylus_metrics_recorder_chromeos.h |
@@ -0,0 +1,50 @@ |
+// 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 CHROME_BROWSER_UI_ASH_METRICS_STYLUS_METRICS_RECORDER_CHROMEOS_H_ |
+#define CHROME_BROWSER_UI_ASH_METRICS_STYLUS_METRICS_RECORDER_CHROMEOS_H_ |
+ |
+#include "base/macros.h" |
+#include "ui/aura/window.h" |
+#include "ui/views/pointer_watcher.h" |
+ |
+namespace gfx { |
+class Point; |
+} |
+ |
+namespace ui { |
+class PointerEvent; |
+} |
+ |
+namespace chromeos { |
+ |
+enum class StylusWindowType { |
+ WINDOW_TYPE_OTHERS = 0, |
sky
2016/09/16 23:20:16
StylusWindowType::WINDOW_TYPE is a bit redundant,
xiaoyinh(OOO Sep 11-29)
2016/09/19 21:19:53
Done.
|
+ WINDOW_TYPE_APP, |
+ WINDOW_TYPE_BROWSER_WINDOW, |
+}; |
+ |
+// A property key to store the type of window that will be used to record stylus |
+// metrics. |
+extern const aura::WindowProperty<StylusWindowType>* const |
+ kStylusWindowTypeBucket; |
+ |
+// An metrics recorder that record stylus related metrics. |
sky
2016/09/16 23:20:16
An->A
record->records
xiaoyinh(OOO Sep 11-29)
2016/09/19 21:19:53
Thanks. Changed.
|
+class StylusMetricsRecorder : public views::PointerWatcher { |
+ public: |
+ StylusMetricsRecorder(); |
+ ~StylusMetricsRecorder() override; |
+ |
+ private: |
+ // views::PointerWatcher: |
+ void OnPointerEventObserved(const ui::PointerEvent& event, |
+ const gfx::Point& location_in_screen, |
+ views::Widget* target) override; |
+ |
+ DISALLOW_COPY_AND_ASSIGN(StylusMetricsRecorder); |
+}; |
+ |
+} // namespace chromeos |
+ |
+#endif // CHROME_BROWSER_UI_ASH_METRICS_STYLUS_METRICS_RECORDER_CHROMEOS_H_ |