Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(510)

Side by Side Diff: ash/system/network/network_list.h

Issue 2836453003: tray: Show warning in network tray when VPN or proxy used. (Closed)
Patch Set: Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 11 matching lines...) Expand all
22 namespace views { 22 namespace views {
23 class Label; 23 class Label;
24 class Separator; 24 class Separator;
25 class View; 25 class View;
26 } 26 }
27 27
28 namespace ash { 28 namespace ash {
29 29
30 struct NetworkInfo; 30 struct NetworkInfo;
31 class NetworkListDelegate; 31 class NetworkListDelegate;
32 class TriView;
32 33
33 // A list of available networks of a given type. This class is used for all 34 // A list of available networks of a given type. This class is used for all
34 // network types except VPNs. For VPNs, see the |VPNList| class. 35 // network types except VPNs. For VPNs, see the |VPNList| class.
35 class NetworkListView : public NetworkListViewBase, 36 class NetworkListView : public NetworkListViewBase,
36 public network_icon::AnimationObserver { 37 public network_icon::AnimationObserver {
37 public: 38 public:
38 class SectionHeaderRowView; 39 class SectionHeaderRowView;
39 40
40 explicit NetworkListView(NetworkListDelegate* delegate); 41 explicit NetworkListView(NetworkListDelegate* delegate);
41 ~NetworkListView() override; 42 ~NetworkListView() override;
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
110 NetworkListDelegate* delegate_; 111 NetworkListDelegate* delegate_;
111 112
112 views::Label* no_wifi_networks_view_; 113 views::Label* no_wifi_networks_view_;
113 views::Label* no_cellular_networks_view_; 114 views::Label* no_cellular_networks_view_;
114 SectionHeaderRowView* cellular_header_view_; 115 SectionHeaderRowView* cellular_header_view_;
115 SectionHeaderRowView* tether_header_view_; 116 SectionHeaderRowView* tether_header_view_;
116 SectionHeaderRowView* wifi_header_view_; 117 SectionHeaderRowView* wifi_header_view_;
117 views::Separator* cellular_separator_view_; 118 views::Separator* cellular_separator_view_;
118 views::Separator* tether_separator_view_; 119 views::Separator* tether_separator_view_;
119 views::Separator* wifi_separator_view_; 120 views::Separator* wifi_separator_view_;
121 TriView* connection_warning_;
120 122
121 // An owned list of network info. 123 // An owned list of network info.
122 std::vector<std::unique_ptr<NetworkInfo>> network_list_; 124 std::vector<std::unique_ptr<NetworkInfo>> network_list_;
123 125
124 using NetworkMap = std::map<views::View*, std::string>; 126 using NetworkMap = std::map<views::View*, std::string>;
125 NetworkMap network_map_; 127 NetworkMap network_map_;
126 128
127 // A map of network guids to their view. 129 // A map of network guids to their view.
128 using NetworkGuidMap = std::map<std::string, views::View*>; 130 using NetworkGuidMap = std::map<std::string, views::View*>;
129 NetworkGuidMap network_guid_map_; 131 NetworkGuidMap network_guid_map_;
130 132
131 // Save a map of network guids to their infos against current |network_list_|. 133 // Save a map of network guids to their infos against current |network_list_|.
132 using NetworkInfoMap = std::map<std::string, std::unique_ptr<NetworkInfo>>; 134 using NetworkInfoMap = std::map<std::string, std::unique_ptr<NetworkInfo>>;
133 NetworkInfoMap last_network_info_map_; 135 NetworkInfoMap last_network_info_map_;
134 136
135 DISALLOW_COPY_AND_ASSIGN(NetworkListView); 137 DISALLOW_COPY_AND_ASSIGN(NetworkListView);
136 }; 138 };
137 139
138 } // namespace ash 140 } // namespace ash
139 141
140 #endif // ASH_SYSTEM_NETWORK_NETWORK_LIST_H_ 142 #endif // ASH_SYSTEM_NETWORK_NETWORK_LIST_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698