1 // Copyright 2020 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 ASH_SHELL_TAB_HANDLER_H_ 6 #define ASH_SHELL_TAB_HANDLER_H_ 7 8 #include "ui/events/event_handler.h" 9 10 namespace ash { 11 12 class Shell; 13 14 // Enables handling of tab when there are no non-minimized windows open in the 15 // shell. This allows keyboard only users to easily get focus to the shelf when 16 // no windows are open. 17 class ShellTabHandler : public ui::EventHandler { 18 public: ShellTabHandler(Shell * shell)19 explicit ShellTabHandler(Shell* shell) : shell_(shell) {} 20 ShellTabHandler(const ShellTabHandler&) = delete; 21 ShellTabHandler& operator=(const ShellTabHandler) = delete; 22 ~ShellTabHandler() override = default; 23 24 // ui::EventHandler: 25 void OnKeyEvent(ui::KeyEvent* key_event) override; 26 27 private: 28 Shell* const shell_; 29 }; 30 31 } // namespace ash 32 #endif // ASH_SHELL_TAB_HANDLER_H_ 33