Separate Simple Backend creation from initialization.
[chromium-blink-merge.git] / ash / touch / touch_uma.h
blob46805b10fa0f33dee7bff1a191282936d06df0b0
1 // Copyright (c) 2012 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.
5 #ifndef ASH_TOUCH_TOUCH_OBSERVER_UMA_H_
6 #define ASH_TOUCH_TOUCH_OBSERVER_UMA_H_
8 #include <map>
10 #include "ash/shell.h"
11 #include "ui/gfx/point.h"
12 #include "ui/views/widget/widget.h"
14 namespace aura {
15 class Window;
18 namespace ash {
19 namespace internal {
21 // Records some touch/gesture event specific details (e.g. what gestures are
22 // targetted to which components etc.)
23 class TouchUMA {
24 public:
25 TouchUMA();
26 ~TouchUMA();
28 void RecordGestureEvent(aura::Window* target,
29 const ui::GestureEvent& event);
30 void RecordTouchEvent(aura::Window* target,
31 const ui::TouchEvent& event);
33 private:
34 void UpdateBurstData(const ui::TouchEvent& event);
36 // These are used to measure the number of touch-start events we receive in a
37 // quick succession, regardless of the target window.
38 bool touch_in_progress_;
39 int burst_length_;
40 base::TimeDelta last_touch_down_time_;
42 DISALLOW_COPY_AND_ASSIGN(TouchUMA);
45 } // namespace internal
46 } // namespace ash
48 #endif // ASH_TOUCH_TOUCH_OBSERVER_UMA_H_