select_to_speak_event_handler_delegate.h 1023 B

12345678910111213141516171819202122232425262728293031
  1. // Copyright 2019 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. #ifndef ASH_PUBLIC_CPP_SELECT_TO_SPEAK_EVENT_HANDLER_DELEGATE_H_
  5. #define ASH_PUBLIC_CPP_SELECT_TO_SPEAK_EVENT_HANDLER_DELEGATE_H_
  6. #include "ash/public/cpp/ash_public_export.h"
  7. namespace ui {
  8. class KeyEvent;
  9. class MouseEvent;
  10. } // namespace ui
  11. namespace ash {
  12. // Allows a client to implement Select-to-Speak.
  13. // TODO(katie): Consider combining DispatchMouseEvent and DispatchKeyEvent
  14. // into a single DispatchEvent function.
  15. class ASH_PUBLIC_EXPORT SelectToSpeakEventHandlerDelegate {
  16. public:
  17. // Sends a KeyEvent to the Select-to-Speak extension in Chrome.
  18. virtual void DispatchKeyEvent(const ui::KeyEvent& event) = 0;
  19. // Sends a MouseEvent to the Select-to-Speak extension in Chrome.
  20. virtual void DispatchMouseEvent(const ui::MouseEvent& event) = 0;
  21. };
  22. } // namespace ash
  23. #endif // ASH_PUBLIC_CPP_SELECT_TO_SPEAK_EVENT_HANDLER_DELEGATE_H_