OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 // The <code>chrome.networkingPrivate</code> API is used for configuring | 5 // The <code>chrome.networkingPrivate</code> API is used for configuring |
6 // network connections (Cellular, Ethernet, VPN, WiFi or WiMAX). This private | 6 // network connections (Cellular, Ethernet, VPN, WiFi or WiMAX). This private |
7 // API is only valid if called from a browser or app associated with the | 7 // API is only valid if called from a browser or app associated with the |
8 // primary user. See the Open Network Configuration (ONC) documentation for | 8 // primary user. See the Open Network Configuration (ONC) documentation for |
9 // descriptions of properties: | 9 // descriptions of properties: |
10 // <a href="https://code.google.com/p/chromium/codesearch#chromium/src/component
s/onc/docs/onc_spec.html"> | 10 // <a href="https://code.google.com/p/chromium/codesearch#chromium/src/component
s/onc/docs/onc_spec.html"> |
(...skipping 211 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
222 dictionary ManagedCertificatePattern { | 222 dictionary ManagedCertificatePattern { |
223 ManagedDOMStringList? EnrollmentURI; | 223 ManagedDOMStringList? EnrollmentURI; |
224 ManagedIssuerSubjectPattern? Issuer; | 224 ManagedIssuerSubjectPattern? Issuer; |
225 ManagedDOMStringList? IssuerCARef; | 225 ManagedDOMStringList? IssuerCARef; |
226 ManagedIssuerSubjectPattern? Subject; | 226 ManagedIssuerSubjectPattern? Subject; |
227 }; | 227 }; |
228 | 228 |
229 dictionary EAPProperties { | 229 dictionary EAPProperties { |
230 DOMString? AnonymousIdentity; | 230 DOMString? AnonymousIdentity; |
231 CertificatePattern? ClientCertPattern; | 231 CertificatePattern? ClientCertPattern; |
| 232 DOMString? ClientCertPKCS11Id; |
232 DOMString? ClientCertRef; | 233 DOMString? ClientCertRef; |
233 DOMString? ClientCertType; | 234 DOMString? ClientCertType; |
234 DOMString? Identity; | 235 DOMString? Identity; |
235 DOMString? Inner; | 236 DOMString? Inner; |
236 // The outer EAP type. Required by ONC, but may not be provided when | 237 // The outer EAP type. Required by ONC, but may not be provided when |
237 // translating from Shill. | 238 // translating from Shill. |
238 DOMString? Outer; | 239 DOMString? Outer; |
239 DOMString? Password; | 240 DOMString? Password; |
240 boolean? SaveCredentials; | 241 boolean? SaveCredentials; |
241 DOMString[]? ServerCAPEMs; | 242 DOMString[]? ServerCAPEMs; |
242 DOMString[]? ServerCARefs; | 243 DOMString[]? ServerCARefs; |
243 DOMString? SubjectMatch; | 244 DOMString? SubjectMatch; |
244 boolean? UseProactiveKeyCaching; | 245 boolean? UseProactiveKeyCaching; |
245 boolean? UseSystemCAs; | 246 boolean? UseSystemCAs; |
246 }; | 247 }; |
247 | 248 |
248 dictionary ManagedEAPProperties { | 249 dictionary ManagedEAPProperties { |
249 ManagedDOMString? AnonymousIdentity; | 250 ManagedDOMString? AnonymousIdentity; |
250 ManagedCertificatePattern? ClientCertPattern; | 251 ManagedCertificatePattern? ClientCertPattern; |
| 252 ManagedDOMString? ClientCertPKCS11Id; |
251 ManagedDOMString? ClientCertRef; | 253 ManagedDOMString? ClientCertRef; |
252 ManagedDOMString? ClientCertType; | 254 ManagedDOMString? ClientCertType; |
253 ManagedDOMString? Identity; | 255 ManagedDOMString? Identity; |
254 ManagedDOMString? Inner; | 256 ManagedDOMString? Inner; |
255 // The outer EAP type. Required by ONC, but may not be provided when | 257 // The outer EAP type. Required by ONC, but may not be provided when |
256 // translating from Shill. | 258 // translating from Shill. |
257 ManagedDOMString? Outer; | 259 ManagedDOMString? Outer; |
258 ManagedDOMString? Password; | 260 ManagedDOMString? Password; |
259 ManagedBoolean? SaveCredentials; | 261 ManagedBoolean? SaveCredentials; |
260 ManagedDOMStringList? ServerCAPEMs; | 262 ManagedDOMStringList? ServerCAPEMs; |
(...skipping 565 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
826 | 828 |
827 dictionary GlobalPolicy { | 829 dictionary GlobalPolicy { |
828 // If true, only policy networks may auto connect. Defaults to false. | 830 // If true, only policy networks may auto connect. Defaults to false. |
829 boolean? AllowOnlyPolicyNetworksToAutoconnect; | 831 boolean? AllowOnlyPolicyNetworksToAutoconnect; |
830 | 832 |
831 // If true, only policy networks may be connected to and no new networks may | 833 // If true, only policy networks may be connected to and no new networks may |
832 // be added or configured. Defaults to false. | 834 // be added or configured. Defaults to false. |
833 boolean? AllowOnlyPolicyNetworksToConnect; | 835 boolean? AllowOnlyPolicyNetworksToConnect; |
834 }; | 836 }; |
835 | 837 |
| 838 dictionary Certificate { |
| 839 // Unique hash for the certificate. |
| 840 DOMString hash; |
| 841 |
| 842 // Certificate issuer common name. |
| 843 DOMString issuedBy; |
| 844 |
| 845 // Certificate name or nickname. |
| 846 DOMString issuedTo; |
| 847 |
| 848 // PEM for server ca certificatess. |
| 849 DOMString? pem; |
| 850 |
| 851 // PKCS#11 id for user certificates. |
| 852 DOMString? PKCS11Id; |
| 853 |
| 854 // Whether or not the certificate is hardware backed. |
| 855 boolean hardwareBacked; |
| 856 }; |
| 857 |
| 858 dictionary CertificateLists { |
| 859 // Certificates available for the ServerCA property. |
| 860 Certificate[] server_ca_certificates; |
| 861 |
| 862 // Certificates available for the UserCert property. |
| 863 Certificate[] user_certificates; |
| 864 }; |
| 865 |
836 callback VoidCallback = void(); | 866 callback VoidCallback = void(); |
837 callback BooleanCallback = void(boolean result); | 867 callback BooleanCallback = void(boolean result); |
838 callback StringCallback = void(DOMString result); | 868 callback StringCallback = void(DOMString result); |
839 // TODO(stevenjb): Use NetworkProperties for |result| once defined. | 869 // TODO(stevenjb): Use NetworkProperties for |result| once defined. |
840 callback GetPropertiesCallback = void(NetworkProperties result); | 870 callback GetPropertiesCallback = void(NetworkProperties result); |
841 // TODO(stevenjb): Use ManagedNetworkProperties for |result| once defined. | 871 // TODO(stevenjb): Use ManagedNetworkProperties for |result| once defined. |
842 callback GetManagedPropertiesCallback = void(ManagedProperties result); | 872 callback GetManagedPropertiesCallback = void(ManagedProperties result); |
843 callback GetStatePropertiesCallback = void(NetworkStateProperties result); | 873 callback GetStatePropertiesCallback = void(NetworkStateProperties result); |
844 callback GetNetworksCallback = void(NetworkStateProperties[] result); | 874 callback GetNetworksCallback = void(NetworkStateProperties[] result); |
845 callback GetDeviceStatesCallback = void(DeviceStateProperties[] result); | 875 callback GetDeviceStatesCallback = void(DeviceStateProperties[] result); |
846 callback GetEnabledNetworkTypesCallback = void(NetworkType[] result); | 876 callback GetEnabledNetworkTypesCallback = void(NetworkType[] result); |
847 callback CaptivePortalStatusCallback = void(CaptivePortalStatus result); | 877 callback CaptivePortalStatusCallback = void(CaptivePortalStatus result); |
848 callback GetGlobalPolicyCallback = void(GlobalPolicy result); | 878 callback GetGlobalPolicyCallback = void(GlobalPolicy result); |
| 879 callback GetCertificateListsCallback = void(CertificateLists result); |
849 | 880 |
850 // These functions all report failures via chrome.runtime.lastError. | 881 // These functions all report failures via chrome.runtime.lastError. |
851 interface Functions { | 882 interface Functions { |
852 // Gets all the properties of the network with id networkGuid. Includes all | 883 // Gets all the properties of the network with id networkGuid. Includes all |
853 // properties of the network (read-only and read/write values). | 884 // properties of the network (read-only and read/write values). |
854 // |networkGuid|: The GUID of the network to get properties for. | 885 // |networkGuid|: The GUID of the network to get properties for. |
855 // |callback|: Called with the network properties when received. | 886 // |callback|: Called with the network properties when received. |
856 static void getProperties(DOMString networkGuid, | 887 static void getProperties(DOMString networkGuid, |
857 GetPropertiesCallback callback); | 888 GetPropertiesCallback callback); |
858 | 889 |
(...skipping 205 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1064 // If empty, the default cellular device will be used. | 1095 // If empty, the default cellular device will be used. |
1065 // |simState|: The SIM state to set. | 1096 // |simState|: The SIM state to set. |
1066 // |callback|: Called when the operation has completed. | 1097 // |callback|: Called when the operation has completed. |
1067 static void setCellularSimState(DOMString networkGuid, | 1098 static void setCellularSimState(DOMString networkGuid, |
1068 CellularSimState simState, | 1099 CellularSimState simState, |
1069 optional VoidCallback callback); | 1100 optional VoidCallback callback); |
1070 | 1101 |
1071 // Gets the global policy properties. These properties are not expected to | 1102 // Gets the global policy properties. These properties are not expected to |
1072 // change during a session. | 1103 // change during a session. |
1073 static void getGlobalPolicy(GetGlobalPolicyCallback callback); | 1104 static void getGlobalPolicy(GetGlobalPolicyCallback callback); |
| 1105 |
| 1106 // Gets the lists of certificates available for network configuration. |
| 1107 static void getCertificateLists(GetCertificateListsCallback callback); |
1074 }; | 1108 }; |
1075 | 1109 |
1076 interface Events { | 1110 interface Events { |
1077 // Fired when the properties change on any of the networks. Sends a list of | 1111 // Fired when the properties change on any of the networks. Sends a list of |
1078 // GUIDs for networks whose properties have changed. | 1112 // GUIDs for networks whose properties have changed. |
1079 static void onNetworksChanged(DOMString[] changes); | 1113 static void onNetworksChanged(DOMString[] changes); |
1080 | 1114 |
1081 // Fired when the list of networks has changed. Sends a complete list of | 1115 // Fired when the list of networks has changed. Sends a complete list of |
1082 // GUIDs for all the current networks. | 1116 // GUIDs for all the current networks. |
1083 static void onNetworkListChanged(DOMString[] changes); | 1117 static void onNetworkListChanged(DOMString[] changes); |
1084 | 1118 |
1085 // Fired when the list of devices has changed or any device state properties | 1119 // Fired when the list of devices has changed or any device state properties |
1086 // have changed. | 1120 // have changed. |
1087 static void onDeviceStateListChanged(); | 1121 static void onDeviceStateListChanged(); |
1088 | 1122 |
1089 // Fired when a portal detection for a network completes. Sends the guid of | 1123 // Fired when a portal detection for a network completes. Sends the guid of |
1090 // the network and the corresponding captive portal status. | 1124 // the network and the corresponding captive portal status. |
1091 static void onPortalDetectionCompleted(DOMString networkGuid, | 1125 static void onPortalDetectionCompleted(DOMString networkGuid, |
1092 CaptivePortalStatus status); | 1126 CaptivePortalStatus status); |
| 1127 |
| 1128 // Fired when any certificate list has changed. |
| 1129 static void onCertificateListsChanged(); |
1093 }; | 1130 }; |
1094 }; | 1131 }; |
OLD | NEW |