fake_network_list_network_header_view_delegate.h 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. // Copyright 2022 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_FAKE_NETWORK_LIST_NETWORK_HEADER_VIEW_DELEGATE_H_
  5. #define ASH_SYSTEM_NETWORK_FAKE_NETWORK_LIST_NETWORK_HEADER_VIEW_DELEGATE_H_
  6. #include "ash/ash_export.h"
  7. #include "ash/system/network/network_list_network_header_view.h"
  8. namespace ash {
  9. // Fake of NetworkListNetworkHeaderView::Delegate implementation.
  10. class ASH_EXPORT FakeNetworkListNetworkHeaderViewDelegate
  11. : public NetworkListNetworkHeaderView::Delegate {
  12. public:
  13. FakeNetworkListNetworkHeaderViewDelegate();
  14. FakeNetworkListNetworkHeaderViewDelegate(
  15. const FakeNetworkListNetworkHeaderViewDelegate&) = delete;
  16. FakeNetworkListNetworkHeaderViewDelegate& operator=(
  17. const FakeNetworkListNetworkHeaderViewDelegate&) = delete;
  18. ~FakeNetworkListNetworkHeaderViewDelegate() override;
  19. // NetworkListNetworkHeaderView::Delegate
  20. void OnMobileToggleClicked(bool new_state) override;
  21. void OnWifiToggleClicked(bool new_state) override;
  22. size_t mobile_toggle_clicked_count() const {
  23. return mobile_toggle_clicked_count_;
  24. }
  25. size_t wifi_toggle_clicked_count() const {
  26. return wifi_toggle_clicked_count_;
  27. }
  28. private:
  29. size_t mobile_toggle_clicked_count_ = 0;
  30. size_t wifi_toggle_clicked_count_ = 0;
  31. };
  32. } // namespace ash
  33. #endif // ASH_SYSTEM_NETWORK_FAKE_NETWORK_LIST_NETWORK_HEADER_VIEW_DELEGATE_H_