123456789101112131415161718192021222324252627282930313233343536373839404142434445464748 |
- // Copyright 2022 The Chromium Authors. All rights reserved.
- // Use of this source code is governed by a BSD-style license that can be
- // found in the LICENSE file.
- #ifndef ASH_SYSTEM_NETWORK_NETWORK_LIST_ITEM_VIEW_H_
- #define ASH_SYSTEM_NETWORK_NETWORK_LIST_ITEM_VIEW_H_
- #include "ash/ash_export.h"
- #include "ash/system/network/network_info.h"
- #include "ash/system/tray/hover_highlight_view.h"
- #include "chromeos/services/network_config/public/mojom/cros_network_config.mojom.h"
- #include "ui/base/metadata/metadata_impl_macros.h"
- namespace ash {
- class ViewClickListener;
- // Base class used in configuring the view shown for a single network in
- // the detailed Network page within the quick settings.
- class ASH_EXPORT NetworkListItemView : public HoverHighlightView {
- public:
- METADATA_HEADER(NetworkListItemView);
- NetworkListItemView(const NetworkListItemView&) = delete;
- NetworkListItemView& operator=(const NetworkListItemView&) = delete;
- ~NetworkListItemView() override;
- virtual void UpdateViewForNetwork(
- const chromeos::network_config::mojom::NetworkStatePropertiesPtr&
- network_properties) = 0;
- const chromeos::network_config::mojom::NetworkStatePropertiesPtr&
- network_properties() {
- return network_properties_;
- }
- protected:
- explicit NetworkListItemView(ViewClickListener* listener);
- std::u16string GetLabel();
- chromeos::network_config::mojom::NetworkStatePropertiesPtr
- network_properties_;
- };
- } // namespace ash
- #endif // ASH_SYSTEM_NETWORK_NETWORK_LIST_ITEM_VIEW_H_
|