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

Side by Side Diff: chrome/browser/chromeos/accessibility/switch_access_event_handler.h

Issue 2711343005: Set keys to traverse accessibility tree. Using focus ring to highlight selected node. (Closed)
Patch Set: Created 3 years, 9 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
OLDNEW
(Empty)
1 // Copyright 2017 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.
4
5 #ifndef CHROME_BROWSER_CHROMEOS_ACCESSIBILITY_SWITCH_ACCESS_EVENT_HANDLER_H_
6 #define CHROME_BROWSER_CHROMEOS_ACCESSIBILITY_SWITCH_ACCESS_EVENT_HANDLER_H_
7
8 #include "base/macros.h"
9 #include "ui/events/event_handler.h"
10
11 namespace chromeos {
12
13 // Intercepts key events.
dmazzoni 2017/02/24 23:06:54 Maybe expand on this a little bit? When Switch Ac
elichtenberg 2017/02/28 00:28:42 Done.
14 class SwitchAccessEventHandler : public ui::EventHandler {
15 public:
16 SwitchAccessEventHandler();
17 ~SwitchAccessEventHandler() override;
18
19 private:
20 // EventHandler:
21 void OnKeyEvent(ui::KeyEvent* event) override;
22
23 void CancelEvent(ui::Event* event);
24 bool DispatchKeyEventToSwitchAccess(const ui::KeyEvent& event);
25
26 enum State {
27 // No key from 1 to 5 is pressed.
28 INACTIVE,
29
30 // The 1 key is down.
31 ONE_KEY_DOWN,
32
33 // The 2 key is down.
34 TWO_KEY_DOWN,
35
36 // The 3 key is down.
37 THREE_KEY_DOWN,
38
39 // The 4 key is down.
40 FOUR_KEY_DOWN,
41
42 // The 5 key is down.
43 FIVE_KEY_DOWN,
44 };
45
46 State state_ = INACTIVE;
47
48 DISALLOW_COPY_AND_ASSIGN(SwitchAccessEventHandler);
49 };
50
51 } // namespace chromeos
52
53 #endif // CHROME_BROWSER_CHROMEOS_ACCESSIBILITY_SWITCH_ACCESS_EVENT_HANDLER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698