Chromium Code Reviews| 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_H_ | |
| 6 #define CHROME_BROWSER_UI_ASH_METRICS_STYLUS_METRICS_RECORDER_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 { | |
|
xiyuan
2016/09/16 20:07:54
This file is in the ash section in browser/ui/BUIL
xiaoyinh(OOO Sep 11-29)
2016/09/16 22:34:25
Renamed as stylus_metrics_recorder_chromeos.h/cc.
| |
| 21 | |
| 22 enum class StylusWindowType { | |
| 23 WINDOW_TYPE_OTHERS = 0, | |
| 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. | |
| 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_H_ | |
| OLD | NEW |