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

Side by Side Diff: trunk/src/chrome/browser/chromeos/keyboard_driven_event_rewriter.h

Issue 167273003: Revert 251382 "event-rewrite: Clean up how events are rewritten." (Closed) Base URL: svn://svn.chromium.org/chrome/
Patch Set: Created 6 years, 10 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
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 #ifndef CHROME_BROWSER_CHROMEOS_KEYBOARD_DRIVEN_EVENT_REWRITER_H_ 5 #ifndef CHROME_BROWSER_CHROMEOS_KEYBOARD_DRIVEN_EVENT_REWRITER_H_
6 #define CHROME_BROWSER_CHROMEOS_KEYBOARD_DRIVEN_EVENT_REWRITER_H_ 6 #define CHROME_BROWSER_CHROMEOS_KEYBOARD_DRIVEN_EVENT_REWRITER_H_
7 7
8 #include "base/basictypes.h" 8 #include "base/basictypes.h"
9 9
10 typedef union _XEvent XEvent; 10 namespace ui {
11 class KeyEvent;
12 }
11 13
12 namespace chromeos { 14 namespace chromeos {
13 15
14 // KeyboardDrivenEventRewriter removes the modifier flags from 16 // KeyboardDrivenEventRewriter removes the modifier flags from
15 // Shift+<Arrow keys|Enter|F6> key events. This mapping only happens 17 // Shift+<Arrow keys|Enter|F6> key events. This mapping only happens
16 // on login screen and only when the keyboard driven oobe is enabled. 18 // on login screen and only when the keyboard driven oobe is enabled.
17 class KeyboardDrivenEventRewriter { 19 class KeyboardDrivenEventRewriter {
18 public: 20 public:
19 KeyboardDrivenEventRewriter(); 21 KeyboardDrivenEventRewriter();
20 ~KeyboardDrivenEventRewriter(); 22 ~KeyboardDrivenEventRewriter();
21 23
22 // Calls RewriteEvent to modify |event| if it is on login screen and the 24 // Calls RewriteEvent to modify |event| if it is on login screen and the
23 // keyboard driven flag is enabled. Returns true if the event is changed 25 // keyboard driven flag is enabled. Returns true if the event is changed
24 // and no further changes should happen. 26 // and no further changes should happen.
25 bool RewriteIfKeyboardDrivenOnLoginScreen(XEvent* event); 27 bool RewriteIfKeyboardDrivenOnLoginScreen(ui::KeyEvent* event);
26 28
27 // Calls RewriteEvent for testing. 29 // Calls RewriteEvent for testing.
28 bool RewriteForTesting(XEvent* event); 30 bool RewriteForTesting(ui::KeyEvent* event);
29 31
30 private: 32 private:
31 bool RewriteEvent(XEvent* event); 33 bool RewriteEvent(ui::KeyEvent* event);
32 34
33 DISALLOW_COPY_AND_ASSIGN(KeyboardDrivenEventRewriter); 35 DISALLOW_COPY_AND_ASSIGN(KeyboardDrivenEventRewriter);
34 }; 36 };
35 37
36 } // namespace chromeos 38 } // namespace chromeos
37 39
38 #endif // CHROME_BROWSER_CHROMEOS_KEYBOARD_DRIVEN_EVENT_REWRITER_H_ 40 #endif // CHROME_BROWSER_CHROMEOS_KEYBOARD_DRIVEN_EVENT_REWRITER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698