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

Side by Side Diff: chrome/browser/chromeos/events/event_rewriter.h

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.cc ('k') | chrome/browser/chromeos/events/event_rewriter.cc » ('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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 #ifndef CHROME_BROWSER_CHROMEOS_EVENTS_EVENT_REWRITER_H_ 5 #ifndef CHROME_BROWSER_CHROMEOS_EVENTS_EVENT_REWRITER_H_
6 #define CHROME_BROWSER_CHROMEOS_EVENTS_EVENT_REWRITER_H_ 6 #define CHROME_BROWSER_CHROMEOS_EVENTS_EVENT_REWRITER_H_
7 7
8 #include <map> 8 #include <map>
9 #include <set> 9 #include <set>
10 #include <string> 10 #include <string>
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
59 // Gets DeviceType from the |device_name|. 59 // Gets DeviceType from the |device_name|.
60 static DeviceType GetDeviceType(const std::string& device_name); 60 static DeviceType GetDeviceType(const std::string& device_name);
61 61
62 private: 62 private:
63 friend class EventRewriterAshTest; 63 friend class EventRewriterAshTest;
64 friend class EventRewriterTest; 64 friend class EventRewriterTest;
65 65
66 void DeviceKeyPressedOrReleased(int device_id); 66 void DeviceKeyPressedOrReleased(int device_id);
67 67
68 // base::MessagePumpObserver overrides: 68 // base::MessagePumpObserver overrides:
69 virtual base::EventStatus WillProcessEvent( 69 virtual void WillProcessEvent(const base::NativeEvent& event) OVERRIDE;
70 const base::NativeEvent& event) OVERRIDE;
71 virtual void DidProcessEvent(const base::NativeEvent& event) OVERRIDE; 70 virtual void DidProcessEvent(const base::NativeEvent& event) OVERRIDE;
72 71
73 // DeviceHierarchyObserver overrides: 72 // DeviceHierarchyObserver overrides:
74 virtual void DeviceHierarchyChanged() OVERRIDE; 73 virtual void DeviceHierarchyChanged() OVERRIDE;
75 virtual void DeviceAdded(int device_id) OVERRIDE; 74 virtual void DeviceAdded(int device_id) OVERRIDE;
76 virtual void DeviceRemoved(int device_id) OVERRIDE; 75 virtual void DeviceRemoved(int device_id) OVERRIDE;
77 76
78 // We don't want to include Xlib.h here since it has polluting macros, so 77 // We don't want to include Xlib.h here since it has polluting macros, so
79 // define these locally. 78 // define these locally.
80 typedef unsigned long KeySym; 79 typedef unsigned long KeySym;
(...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after
197 keyboard_driven_event_rewriter_; 196 keyboard_driven_event_rewriter_;
198 197
199 const PrefService* pref_service_for_testing_; 198 const PrefService* pref_service_for_testing_;
200 199
201 DISALLOW_COPY_AND_ASSIGN(EventRewriter); 200 DISALLOW_COPY_AND_ASSIGN(EventRewriter);
202 }; 201 };
203 202
204 } // namespace chromeos 203 } // namespace chromeos
205 204
206 #endif // CHROME_BROWSER_CHROMEOS_EVENTS_EVENT_REWRITER_H_ 205 #endif // CHROME_BROWSER_CHROMEOS_EVENTS_EVENT_REWRITER_H_
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/device_uma.cc ('k') | chrome/browser/chromeos/events/event_rewriter.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698