1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
ash / system / network / network_list_item_view.h [blame]
// Copyright 2022 The Chromium Authors
// 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/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 {
METADATA_HEADER(NetworkListItemView, HoverHighlightView)
public:
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_