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 109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
120 | 120 |
121 // Returns true if the info should be updated to the view for network, | 121 // Returns true if the info should be updated to the view for network, |
122 // otherwise false. | 122 // otherwise false. |
123 bool NeedUpdateViewForNetwork(const NetworkInfo& info) const; | 123 bool NeedUpdateViewForNetwork(const NetworkInfo& info) const; |
124 | 124 |
125 bool needs_relayout_; | 125 bool needs_relayout_; |
126 | 126 |
127 views::Label* no_wifi_networks_view_; | 127 views::Label* no_wifi_networks_view_; |
128 views::Label* no_cellular_networks_view_; | 128 views::Label* no_cellular_networks_view_; |
129 SectionHeaderRowView* cellular_header_view_; | 129 SectionHeaderRowView* cellular_header_view_; |
130 SectionHeaderRowView* tether_header_view_; | |
131 SectionHeaderRowView* wifi_header_view_; | 130 SectionHeaderRowView* wifi_header_view_; |
132 views::Separator* cellular_separator_view_; | 131 views::Separator* cellular_separator_view_; |
133 views::Separator* tether_separator_view_; | |
134 views::Separator* wifi_separator_view_; | 132 views::Separator* wifi_separator_view_; |
135 TriView* connection_warning_; | 133 TriView* connection_warning_; |
136 | 134 |
137 // An owned list of network info. | 135 // An owned list of network info. |
138 std::vector<std::unique_ptr<NetworkInfo>> network_list_; | 136 std::vector<std::unique_ptr<NetworkInfo>> network_list_; |
139 | 137 |
140 using NetworkMap = std::map<views::View*, std::string>; | 138 using NetworkMap = std::map<views::View*, std::string>; |
141 NetworkMap network_map_; | 139 NetworkMap network_map_; |
142 | 140 |
143 // A map of network guids to their view. | 141 // A map of network guids to their view. |
144 using NetworkGuidMap = std::map<std::string, HoverHighlightView*>; | 142 using NetworkGuidMap = std::map<std::string, HoverHighlightView*>; |
145 NetworkGuidMap network_guid_map_; | 143 NetworkGuidMap network_guid_map_; |
146 | 144 |
147 // Save a map of network guids to their infos against current |network_list_|. | 145 // Save a map of network guids to their infos against current |network_list_|. |
148 using NetworkInfoMap = std::map<std::string, std::unique_ptr<NetworkInfo>>; | 146 using NetworkInfoMap = std::map<std::string, std::unique_ptr<NetworkInfo>>; |
149 NetworkInfoMap last_network_info_map_; | 147 NetworkInfoMap last_network_info_map_; |
150 | 148 |
151 DISALLOW_COPY_AND_ASSIGN(NetworkListView); | 149 DISALLOW_COPY_AND_ASSIGN(NetworkListView); |
152 }; | 150 }; |
153 | 151 |
154 } // namespace tray | 152 } // namespace tray |
155 } // namespace ash | 153 } // namespace ash |
156 | 154 |
157 #endif // ASH_SYSTEM_NETWORK_NETWORK_LIST_H_ | 155 #endif // ASH_SYSTEM_NETWORK_NETWORK_LIST_H_ |
OLD | NEW |