network_list_view_controller.h 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  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_NETWORK_LIST_VIEW_CONTROLLER_H_
  5. #define ASH_SYSTEM_NETWORK_NETWORK_LIST_VIEW_CONTROLLER_H_
  6. #include "ash/ash_export.h"
  7. #include "ash/system/network/network_detailed_network_view.h"
  8. namespace ash {
  9. // This class defines the interface used to add, modify, and remove networks
  10. // from the network list of the detailed network device page within the quick
  11. // settings. This class includes the definition of the factory used to create
  12. // instances of implementations of this class.
  13. class ASH_EXPORT NetworkListViewController {
  14. public:
  15. class Factory {
  16. public:
  17. Factory(const Factory&) = delete;
  18. const Factory& operator=(const Factory&) = delete;
  19. virtual ~Factory() = default;
  20. static std::unique_ptr<NetworkListViewController> Create(
  21. NetworkDetailedNetworkView* network_detailed_network_view);
  22. static void SetFactoryForTesting(Factory* test_factory);
  23. protected:
  24. Factory() = default;
  25. virtual std::unique_ptr<NetworkListViewController> CreateForTesting() = 0;
  26. };
  27. NetworkListViewController(const NetworkListViewController&) = delete;
  28. NetworkListViewController& operator=(const NetworkListViewController&) =
  29. delete;
  30. virtual ~NetworkListViewController() = default;
  31. protected:
  32. NetworkListViewController() = default;
  33. };
  34. } // namespace ash
  35. #endif // ASH_SYSTEM_NETWORK_NETWORK_LIST_VIEW_CONTROLLER_H_