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

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: Fixing closure compilation error 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 // When Switch Access is enabled, intercepts a few keys before the rest of the
14 // OS has a chance to handle them, as a method for controlling the entire OS
15 // with a small number of switches. The key events do not propagate to the rest
16 // of the system.
17 //
18 // This class just intercepts the keys and forwards them to the component
19 // extension.
20 class SwitchAccessEventHandler : public ui::EventHandler {
21 public:
22 SwitchAccessEventHandler();
23 ~SwitchAccessEventHandler() override;
24
25 private:
26 // EventHandler:
27 void OnKeyEvent(ui::KeyEvent* event) override;
28
29 void CancelEvent(ui::Event* event);
30 void DispatchKeyEventToSwitchAccess(const ui::KeyEvent& event);
31
32 DISALLOW_COPY_AND_ASSIGN(SwitchAccessEventHandler);
33 };
34
35 } // namespace chromeos
36
37 #endif // CHROME_BROWSER_CHROMEOS_ACCESSIBILITY_SWITCH_ACCESS_EVENT_HANDLER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698