Pin Chrome's shortcut to the Win10 Start menu on install and OS upgrade.
[chromium-blink-merge.git] / ui / events / ozone / evdev / touch_evdev_debug_buffer.h
blob673a45467adeae6ba6bf296059f18f8214033bba
1 // Copyright 2015 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 UI_EVENTS_OZONE_EVDEV_TOUCH_DEBUG_BUFFER_H_
6 #define UI_EVENTS_OZONE_EVDEV_TOUCH_DEBUG_BUFFER_H_
8 #include <linux/input.h>
9 #include <vector>
11 #include "base/memory/scoped_ptr.h"
12 #include "ui/events/ozone/evdev/events_ozone_evdev_export.h"
14 namespace ui {
16 class EventDeviceInfo;
18 class EVENTS_OZONE_EVDEV_EXPORT TouchEventLogEvdev {
19 public:
20 TouchEventLogEvdev();
21 ~TouchEventLogEvdev();
23 void Initialize(const EventDeviceInfo& devinfo);
24 void ProcessEvent(size_t cur_slot, const input_event* ev);
26 void DumpLog(const char* filename);
28 private:
29 struct TouchEvent {
30 struct input_event ev;
31 int slot;
33 const int kDebugBufferSize = 65536;
34 scoped_ptr<TouchEvent[]> logged_events_;
35 int debug_buffer_tail_ = 0;
37 std::string device_name_;
39 struct AbsAxisData {
40 AbsAxisData(int code, const input_absinfo& info);
41 AbsAxisData(const AbsAxisData& other);
42 ~AbsAxisData();
44 int code;
45 input_absinfo info;
48 std::vector<AbsAxisData> axes_;
51 } // namespace ui
53 #endif // UI_EVENTS_OZONE_EVDEV_TOUCH_EVDEV_BUFFER_H_