OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 CHROME_BROWSER_CHROMEOS_NETWORK_LIST_H_ | 5 #ifndef CHROME_BROWSER_CHROMEOS_NETWORK_LIST_H_ |
6 #define CHROME_BROWSER_CHROMEOS_NETWORK_LIST_H_ | 6 #define CHROME_BROWSER_CHROMEOS_NETWORK_LIST_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <string> | 9 #include <string> |
10 #include <vector> | 10 #include <vector> |
(...skipping 18 matching lines...) Expand all Loading... |
29 struct NetworkItem { | 29 struct NetworkItem { |
30 NetworkItem() | 30 NetworkItem() |
31 : network_type(NETWORK_EMPTY), | 31 : network_type(NETWORK_EMPTY), |
32 connected(false) {} | 32 connected(false) {} |
33 NetworkItem(NetworkType network_type, | 33 NetworkItem(NetworkType network_type, |
34 const string16& label) | 34 const string16& label) |
35 : network_type(network_type), | 35 : network_type(network_type), |
36 label(label) {} | 36 label(label) {} |
37 NetworkItem(NetworkType network_type, | 37 NetworkItem(NetworkType network_type, |
38 string16 label, | 38 string16 label, |
39 WifiNetwork wifi_network, | 39 WifiNetwork* wifi_network, |
40 CellularNetwork cellular_network) | 40 CellularNetwork* cellular_network) |
41 : network_type(network_type), | 41 : network_type(network_type), |
42 label(label), | 42 label(label), |
43 wifi_network(wifi_network), | 43 wifi_network(wifi_network), |
44 cellular_network(cellular_network), | 44 cellular_network(cellular_network), |
45 connected(false) {} | 45 connected(false) {} |
46 | 46 |
47 NetworkType network_type; | 47 NetworkType network_type; |
48 string16 label; // string representation of the network (shown in UI). | 48 string16 label; // string representation of the network (shown in UI). |
49 WifiNetwork wifi_network; | 49 WifiNetwork* wifi_network; |
50 CellularNetwork cellular_network; | 50 CellularNetwork* cellular_network; |
51 bool connected; | 51 bool connected; |
52 }; | 52 }; |
53 | 53 |
54 NetworkList(); | 54 NetworkList(); |
55 virtual ~NetworkList() {} | 55 virtual ~NetworkList() {} |
56 | 56 |
57 // True if network list is empty. | 57 // True if network list is empty. |
58 bool IsEmpty() const { | 58 bool IsEmpty() const { |
59 return networks_.empty(); | 59 return networks_.empty(); |
60 } | 60 } |
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
111 | 111 |
112 // Connecting networks indexes. | 112 // Connecting networks indexes. |
113 NetworkIndexVector connecting_networks_; | 113 NetworkIndexVector connecting_networks_; |
114 | 114 |
115 DISALLOW_COPY_AND_ASSIGN(NetworkList); | 115 DISALLOW_COPY_AND_ASSIGN(NetworkList); |
116 }; | 116 }; |
117 | 117 |
118 } // namespace chromeos | 118 } // namespace chromeos |
119 | 119 |
120 #endif // CHROME_BROWSER_CHROMEOS_NETWORK_LIST_H_ | 120 #endif // CHROME_BROWSER_CHROMEOS_NETWORK_LIST_H_ |
OLD | NEW |