fake_network_list_wifi_header_view.h 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  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_WIFI_HEADER_VIEW_H_
  5. #define ASH_SYSTEM_NETWORK_FAKE_NETWORK_LIST_WIFI_HEADER_VIEW_H_
  6. #include "ash/ash_export.h"
  7. #include "ash/style/icon_button.h"
  8. #include "ash/system/network/network_list_network_header_view.h"
  9. #include "ash/system/network/network_list_wifi_header_view.h"
  10. #include "ash/system/tray/tri_view.h"
  11. namespace ash {
  12. // Fake implementation of NetworkListWifiHeaderView
  13. class ASH_EXPORT FakeNetworkListWifiHeaderView
  14. : public NetworkListWifiHeaderView {
  15. public:
  16. explicit FakeNetworkListWifiHeaderView(
  17. NetworkListNetworkHeaderView::Delegate* delegate);
  18. FakeNetworkListWifiHeaderView(const FakeNetworkListWifiHeaderView&) = delete;
  19. FakeNetworkListWifiHeaderView& operator=(
  20. const FakeNetworkListWifiHeaderView&) = delete;
  21. ~FakeNetworkListWifiHeaderView() override;
  22. bool is_toggle_enabled() { return is_toggle_enabled_; }
  23. bool is_toggle_on() { return is_toggle_on_; }
  24. size_t set_toggle_state_count() { return set_toggle_state_count_; }
  25. bool is_join_wifi_enabled() { return is_join_wifi_enabled_; }
  26. bool is_join_wifi_visible() { return is_join_wifi_visible_; }
  27. size_t set_join_wifi_button_state_count() {
  28. return set_join_wifi_button_state_count_;
  29. }
  30. private:
  31. // NetworkListNetworkHeaderView:
  32. void SetToggleState(bool enabled, bool visible) override;
  33. // NetworkListWifiHeaderView:
  34. void SetJoinWifiButtonState(bool enabled, bool visible) override;
  35. bool is_toggle_enabled_;
  36. bool is_toggle_on_;
  37. size_t set_toggle_state_count_;
  38. bool is_join_wifi_enabled_;
  39. bool is_join_wifi_visible_;
  40. size_t set_join_wifi_button_state_count_;
  41. };
  42. } // namespace ash
  43. #endif // ASH_SYSTEM_NETWORK_FAKE_NETWORK_LIST_WIFI_HEADER_VIEW_H_