OLD | NEW |
---|---|
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef ASH_SYSTEM_NETWORK_NETWORK_LIST_H_ | 5 #ifndef ASH_SYSTEM_NETWORK_NETWORK_LIST_H_ |
6 #define ASH_SYSTEM_NETWORK_NETWORK_LIST_H_ | 6 #define ASH_SYSTEM_NETWORK_NETWORK_LIST_H_ |
7 | 7 |
8 #include <map> | 8 #include <map> |
9 #include <memory> | 9 #include <memory> |
10 #include <set> | 10 #include <set> |
(...skipping 14 matching lines...) Expand all Loading... | |
25 | 25 |
26 namespace ash { | 26 namespace ash { |
27 class HoverHighlightView; | 27 class HoverHighlightView; |
28 class TriView; | 28 class TriView; |
29 | 29 |
30 namespace tray { | 30 namespace tray { |
31 | 31 |
32 // A list of available networks of a given type. This class is used for all | 32 // A list of available networks of a given type. This class is used for all |
33 // network types except VPNs. For VPNs, see the |VPNList| class. | 33 // network types except VPNs. For VPNs, see the |VPNList| class. |
34 class NetworkListView : public NetworkStateListDetailedView, | 34 class NetworkListView : public NetworkStateListDetailedView, |
35 public network_icon::AnimationObserver { | 35 public network_icon::AnimationObserver, |
36 public TrayDetailsView::InfoLabelDelegate { | |
36 public: | 37 public: |
37 class SectionHeaderRowView; | 38 class SectionHeaderRowView; |
38 | 39 |
39 NetworkListView(SystemTrayItem* owner, LoginStatus login); | 40 NetworkListView(SystemTrayItem* owner, LoginStatus login); |
40 ~NetworkListView() override; | 41 ~NetworkListView() override; |
41 | 42 |
42 // NetworkStateListDetailedView: | 43 // NetworkStateListDetailedView: |
43 void UpdateNetworkList() override; | 44 void UpdateNetworkList() override; |
44 bool IsNetworkEntry(views::View* view, std::string* guid) const override; | 45 bool IsNetworkEntry(views::View* view, std::string* guid) const override; |
45 | 46 |
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
99 // Creates an info label with text specified by |message_id| and adds it to | 100 // Creates an info label with text specified by |message_id| and adds it to |
100 // |scroll_content()| if necessary or updates the text and reorders the | 101 // |scroll_content()| if necessary or updates the text and reorders the |
101 // |scroll_content()| placing the info label at |insertion_index|. When | 102 // |scroll_content()| placing the info label at |insertion_index|. When |
102 // |message_id| is zero removes the |*info_label_ptr| from the | 103 // |message_id| is zero removes the |*info_label_ptr| from the |
103 // |scroll_content()| and destroys it. |info_label_ptr| is an in/out parameter | 104 // |scroll_content()| and destroys it. |info_label_ptr| is an in/out parameter |
104 // and is only modified if the info label is created or destroyed. | 105 // and is only modified if the info label is created or destroyed. |
105 void UpdateInfoLabel(int message_id, | 106 void UpdateInfoLabel(int message_id, |
106 int insertion_index, | 107 int insertion_index, |
107 InfoLabel** info_label_ptr); | 108 InfoLabel** info_label_ptr); |
108 | 109 |
110 // InfoLabelDelegate: | |
Kyle Horimoto
2017/07/10 18:37:07
nit: Overrides should generally go at the bottom o
lesliewatkins
2017/07/12 21:49:50
Done.
| |
111 void OnLabelClicked(InfoLabel* label); | |
James Cook
2017/07/10 18:43:03
Probably needs "override"
lesliewatkins
2017/07/12 21:49:50
Done.
| |
112 | |
109 // Creates a cellular/tether/Wi-Fi header row |view| and adds it to | 113 // Creates a cellular/tether/Wi-Fi header row |view| and adds it to |
110 // |scroll_content()| if necessary and reorders the |scroll_content()| placing | 114 // |scroll_content()| if necessary and reorders the |scroll_content()| placing |
111 // the |view| at |child_index|. Returns the index where the next child should | 115 // the |view| at |child_index|. Returns the index where the next child should |
112 // be inserted, i.e., the index directly after the last inserted child. | 116 // be inserted, i.e., the index directly after the last inserted child. |
113 int UpdateSectionHeaderRow(chromeos::NetworkTypePattern pattern, | 117 int UpdateSectionHeaderRow(chromeos::NetworkTypePattern pattern, |
114 bool enabled, | 118 bool enabled, |
115 int child_index, | 119 int child_index, |
116 SectionHeaderRowView** view, | 120 SectionHeaderRowView** view, |
117 views::Separator** separator_view); | 121 views::Separator** separator_view); |
118 | 122 |
(...skipping 28 matching lines...) Expand all Loading... | |
147 using NetworkInfoMap = std::map<std::string, std::unique_ptr<NetworkInfo>>; | 151 using NetworkInfoMap = std::map<std::string, std::unique_ptr<NetworkInfo>>; |
148 NetworkInfoMap last_network_info_map_; | 152 NetworkInfoMap last_network_info_map_; |
149 | 153 |
150 DISALLOW_COPY_AND_ASSIGN(NetworkListView); | 154 DISALLOW_COPY_AND_ASSIGN(NetworkListView); |
151 }; | 155 }; |
152 | 156 |
153 } // namespace tray | 157 } // namespace tray |
154 } // namespace ash | 158 } // namespace ash |
155 | 159 |
156 #endif // ASH_SYSTEM_NETWORK_NETWORK_LIST_H_ | 160 #endif // ASH_SYSTEM_NETWORK_NETWORK_LIST_H_ |
OLD | NEW |