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 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.
| |
24 WINDOW_TYPE_APP, | |
25 WINDOW_TYPE_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 // 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.
| |
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 |