fake_network_list_mobile_header_view.h 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  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_MOBILE_HEADER_VIEW_H_
  5. #define ASH_SYSTEM_NETWORK_FAKE_NETWORK_LIST_MOBILE_HEADER_VIEW_H_
  6. #include "ash/ash_export.h"
  7. #include "ash/style/icon_button.h"
  8. #include "ash/system/network/network_list_mobile_header_view.h"
  9. #include "ash/system/network/network_list_network_header_view.h"
  10. #include "ash/system/tray/tri_view.h"
  11. namespace ash {
  12. // Fake implementation of NetworkListMobileHeaderView
  13. class ASH_EXPORT FakeNetworkListMobileHeaderView
  14. : public NetworkListMobileHeaderView {
  15. public:
  16. explicit FakeNetworkListMobileHeaderView(
  17. NetworkListNetworkHeaderView::Delegate* delegate);
  18. FakeNetworkListMobileHeaderView(const FakeNetworkListMobileHeaderView&) =
  19. delete;
  20. FakeNetworkListMobileHeaderView& operator=(
  21. const FakeNetworkListMobileHeaderView&) = delete;
  22. ~FakeNetworkListMobileHeaderView() override;
  23. bool is_toggle_enabled() { return is_toggle_enabled_; }
  24. bool is_toggle_on() { return is_toggle_on_; }
  25. size_t set_toggle_state_count() { return set_toggle_state_count_; }
  26. bool is_add_esim_enabled() { return is_add_esim_enabled_; }
  27. bool is_add_esim_visible() { return is_add_esim_visible_; }
  28. size_t set_add_esim_button_state_count() {
  29. return set_add_esim_button_state_count_;
  30. }
  31. private:
  32. // NetworkListNetworkHeaderView:
  33. void SetToggleState(bool enabled, bool is_on) override;
  34. // NetworkListMobileHeaderView:
  35. void SetAddESimButtonState(bool enabled, bool visible) override;
  36. bool is_toggle_enabled_;
  37. bool is_toggle_on_;
  38. size_t set_toggle_state_count_;
  39. bool is_add_esim_enabled_;
  40. bool is_add_esim_visible_;
  41. size_t set_add_esim_button_state_count_;
  42. };
  43. } // namespace ash
  44. #endif // ASH_SYSTEM_NETWORK_FAKE_NETWORK_LIST_MOBIL_HEADER_VIEW_H_