OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "chrome/browser/chromeos/device_uma.h" | 5 #include "chrome/browser/chromeos/device_uma.h" |
6 | 6 |
7 #include <X11/extensions/XInput.h> | 7 #include <X11/extensions/XInput.h> |
8 #include <X11/extensions/XInput2.h> | 8 #include <X11/extensions/XInput2.h> |
9 | 9 |
10 #include "base/logging.h" | 10 #include "base/logging.h" |
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
51 } | 51 } |
52 } | 52 } |
53 | 53 |
54 void DeviceUMA::RemoveMessageLoopObserver() { | 54 void DeviceUMA::RemoveMessageLoopObserver() { |
55 if (is_observing_) { | 55 if (is_observing_) { |
56 base::MessageLoopForUI::current()->RemoveObserver(this); | 56 base::MessageLoopForUI::current()->RemoveObserver(this); |
57 is_observing_ = false; | 57 is_observing_ = false; |
58 } | 58 } |
59 } | 59 } |
60 | 60 |
61 base::EventStatus DeviceUMA::WillProcessEvent( | 61 void DeviceUMA::WillProcessEvent(const base::NativeEvent& event) { |
62 const base::NativeEvent& event) { | |
63 CheckIncomingEvent(event); | 62 CheckIncomingEvent(event); |
64 return base::EVENT_CONTINUE; | |
65 } | 63 } |
66 | 64 |
67 void DeviceUMA::DidProcessEvent( | 65 void DeviceUMA::DidProcessEvent( |
68 const base::NativeEvent& event) { | 66 const base::NativeEvent& event) { |
69 } | 67 } |
70 | 68 |
71 void DeviceUMA::CheckTouchpadEvent(const base::NativeEvent& native_event) { | 69 void DeviceUMA::CheckTouchpadEvent(const base::NativeEvent& native_event) { |
72 XIDeviceEvent* xiev = | 70 XIDeviceEvent* xiev = |
73 static_cast<XIDeviceEvent*>(native_event->xcookie.data); | 71 static_cast<XIDeviceEvent*>(native_event->xcookie.data); |
74 // We take only the slave event since there is no need to count twice. | 72 // We take only the slave event since there is no need to count twice. |
(...skipping 28 matching lines...) Expand all Loading... |
103 CheckTouchpadEvent(event); | 101 CheckTouchpadEvent(event); |
104 break; | 102 break; |
105 } | 103 } |
106 default: | 104 default: |
107 break; | 105 break; |
108 } | 106 } |
109 return; | 107 return; |
110 } | 108 } |
111 | 109 |
112 } // namespace chromeos | 110 } // namespace chromeos |
OLD | NEW |