Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(175)

Side by Side Diff: chrome/browser/chromeos/device_uma.cc

Issue 223483002: base: Do not allow MessagePumpObservers to consume events. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: tot-merge-r262009 Created 6 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « chrome/browser/chromeos/device_uma.h ('k') | chrome/browser/chromeos/events/event_rewriter.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/device_uma.h ('k') | chrome/browser/chromeos/events/event_rewriter.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698