Cast: Stop logging kVideoFrameSentToEncoder and rename a couple events.
[chromium-blink-merge.git] / chrome / browser / chromeos / device_uma.h
blob7bff7586756d63b0e3334caa7489f4a4a4c1830d
1 // Copyright 2013 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 CHROME_BROWSER_CHROMEOS_DEVICE_UMA_H_
6 #define CHROME_BROWSER_CHROMEOS_DEVICE_UMA_H_
8 #include "base/basictypes.h"
9 #include "ui/events/platform/platform_event_observer.h"
11 template <typename T> struct DefaultSingletonTraits;
13 namespace chromeos {
15 // A class to record devices' input event details via the UMA system
16 class DeviceUMA : public ui::PlatformEventObserver {
17 public:
18 // Getting instance starts the class automatically if it hasn't been
19 // started before.
20 static DeviceUMA* GetInstance();
22 void Stop();
24 private:
25 friend struct DefaultSingletonTraits<DeviceUMA>;
27 DeviceUMA();
28 virtual ~DeviceUMA();
30 // ui::PlatformEventObserver:
31 virtual void WillProcessEvent(const ui::PlatformEvent& event) OVERRIDE;
32 virtual void DidProcessEvent(const ui::PlatformEvent& event) OVERRIDE;
34 // Check CrOS touchpad events to see if the metrics gesture is present
35 void CheckTouchpadEvent(XEvent* event);
37 // Check the incoming events for interesting patterns that we care about.
38 void CheckIncomingEvent(XEvent* event);
40 bool stopped_;
42 DISALLOW_COPY_AND_ASSIGN(DeviceUMA);
45 } // namespace chromeos
47 #endif // CHROME_BROWSER_CHROMEOS_DEVICE_UMA_H_