dictation_nudge.h 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. // Copyright 2021 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_ACCESSIBILITY_DICTATION_NUDGE_H_
  5. #define ASH_ACCESSIBILITY_DICTATION_NUDGE_H_
  6. #include <string>
  7. #include "ash/ash_export.h"
  8. #include "ash/system/tray/system_nudge.h"
  9. namespace ash {
  10. class DictationNudgeController;
  11. class DictationNudgeControllerTest;
  12. // Implements a contextual nudge for Dictation informing the user
  13. // that their Dictation language now works offline.
  14. class ASH_EXPORT DictationNudge : public SystemNudge {
  15. public:
  16. explicit DictationNudge(DictationNudgeController* controller);
  17. DictationNudge(const DictationNudge&) = delete;
  18. DictationNudge& operator=(const DictationNudge&) = delete;
  19. ~DictationNudge() override;
  20. protected:
  21. // SystemNudge:
  22. std::unique_ptr<SystemNudgeLabel> CreateLabelView() const override;
  23. const gfx::VectorIcon& GetIcon() const override;
  24. std::u16string GetAccessibilityText() const override;
  25. private:
  26. friend class DictationNudgeControllerTest;
  27. // Unowned. The DictationNudgeController owns |this|.
  28. const DictationNudgeController* const controller_;
  29. };
  30. } // namespace ash
  31. #endif // ASH_ACCESSIBILITY_DICTATION_NUDGE_H_