OLD | NEW |
(Empty) | |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef CHROME_BROWSER_UI_ASH_METRICS_STYLUS_METRICS_RECORDER_CHROMEOS_H_ |
| 6 #define CHROME_BROWSER_UI_ASH_METRICS_STYLUS_METRICS_RECORDER_CHROMEOS_H_ |
| 7 |
| 8 #include "base/macros.h" |
| 9 #include "ui/aura/window.h" |
| 10 #include "ui/views/pointer_watcher.h" |
| 11 |
| 12 namespace gfx { |
| 13 class Point; |
| 14 } |
| 15 |
| 16 namespace ui { |
| 17 class PointerEvent; |
| 18 } |
| 19 |
| 20 namespace chromeos { |
| 21 |
| 22 enum class StylusWindowType { |
| 23 OTHERS = 0, |
| 24 APP, |
| 25 BROWSER_WINDOW, |
| 26 }; |
| 27 |
| 28 // A property key to store the type of window that will be used to record stylus |
| 29 // metrics. |
| 30 extern const aura::WindowProperty<StylusWindowType>* const |
| 31 kStylusWindowTypeBucket; |
| 32 |
| 33 // A metrics recorder that records stylus related metrics. |
| 34 class StylusMetricsRecorder : public views::PointerWatcher { |
| 35 public: |
| 36 StylusMetricsRecorder(); |
| 37 ~StylusMetricsRecorder() override; |
| 38 |
| 39 private: |
| 40 // views::PointerWatcher: |
| 41 void OnPointerEventObserved(const ui::PointerEvent& event, |
| 42 const gfx::Point& location_in_screen, |
| 43 views::Widget* target) override; |
| 44 |
| 45 DISALLOW_COPY_AND_ASSIGN(StylusMetricsRecorder); |
| 46 }; |
| 47 |
| 48 } // namespace chromeos |
| 49 |
| 50 #endif // CHROME_BROWSER_UI_ASH_METRICS_STYLUS_METRICS_RECORDER_CHROMEOS_H_ |
OLD | NEW |