tray_toggle_button.h 1.0 KB

12345678910111213141516171819202122232425262728293031323334
  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_SYSTEM_TRAY_TRAY_TOGGLE_BUTTON_H_
  5. #define ASH_SYSTEM_TRAY_TRAY_TOGGLE_BUTTON_H_
  6. #include "ui/base/metadata/metadata_header_macros.h"
  7. #include "ui/views/controls/button/toggle_button.h"
  8. namespace ui {
  9. class Event;
  10. } // namespace ui
  11. namespace ash {
  12. // A toggle button configured for the system tray menu's layout. Also gets the
  13. // colors from AshColorProvider.
  14. class TrayToggleButton : public views::ToggleButton {
  15. public:
  16. METADATA_HEADER(TrayToggleButton);
  17. TrayToggleButton(PressedCallback callback, int accessible_name_id);
  18. TrayToggleButton(const TrayToggleButton&) = delete;
  19. TrayToggleButton& operator=(const TrayToggleButton&) = delete;
  20. ~TrayToggleButton() override = default;
  21. // views::ToggleButton:
  22. void OnThemeChanged() override;
  23. void NotifyClick(const ui::Event& event) override;
  24. };
  25. } // namespace ash
  26. #endif // ASH_SYSTEM_TRAY_TRAY_TOGGLE_BUTTON_H_