network_feature_pod_button.h 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  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_NETWORK_NETWORK_FEATURE_POD_BUTTON_H_
  5. #define ASH_SYSTEM_NETWORK_NETWORK_FEATURE_POD_BUTTON_H_
  6. #include "ash/ash_export.h"
  7. #include "ash/system/unified/feature_pod_button.h"
  8. #include "ui/base/metadata/metadata_header_macros.h"
  9. namespace ash {
  10. // This class that provides the corresponding controller with notifications of
  11. // when the theme for this view changes.
  12. class ASH_EXPORT NetworkFeaturePodButton : public FeaturePodButton {
  13. public:
  14. METADATA_HEADER(NetworkFeaturePodButton);
  15. // This class defines the interface that NetworkFeaturePodButton will use to
  16. // propagate theme changes.
  17. class Delegate {
  18. public:
  19. virtual void OnFeaturePodButtonThemeChanged() = 0;
  20. };
  21. NetworkFeaturePodButton(FeaturePodControllerBase* controller,
  22. Delegate* delegate);
  23. NetworkFeaturePodButton(const NetworkFeaturePodButton&) = delete;
  24. NetworkFeaturePodButton& operator=(const NetworkFeaturePodButton&) = delete;
  25. ~NetworkFeaturePodButton() override;
  26. private:
  27. friend class NetworkFeaturePodButtonTest;
  28. // views::Button:
  29. void OnThemeChanged() override;
  30. Delegate* delegate_;
  31. };
  32. } // namespace ash
  33. #endif // ASH_SYSTEM_NETWORK_NETWORK_FEATURE_POD_BUTTON_H_