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"> |
11 // src/components/onc/docs/onc_spec.html</a>, or the | 11 // src/components/onc/docs/onc_spec.html</a>, or the |
12 // <a href="http://www.chromium.org/chromium-os/chromiumos-design-docs/open-netw ork-configuration"> | 12 // <a href="http://www.chromium.org/chromium-os/chromiumos-design-docs/open-netw ork-configuration"> |
13 // Open Network Configuration</a> page at chromium.org. | 13 // Open Network Configuration</a> page at chromium.org. |
14 // <br><br> | 14 // <br><br> |
15 // NOTE: Most dictionary properties and enum values use UpperCamelCase to match | 15 // NOTE: Most dictionary properties and enum values use UpperCamelCase to match |
16 // the ONC spec instead of the JavaScript lowerCamelCase convention. | 16 // the ONC spec instead of the JavaScript lowerCamelCase convention. |
17 // <br><br> | 17 // <br><br> |
18 // "State" properties describe just the ONC properties returned by | 18 // "State" properties describe just the ONC properties returned by |
19 // $(ref:networkingPrivate.getState) and $(ref:networkingPrivate.getNetworks). | 19 // $(ref:networkingPrivate.getState) and $(ref:networkingPrivate.getNetworks). |
20 // <br><br> | 20 // <br><br> |
21 // "Config" properties describe just the ONC properties that can be configured | 21 // "Config" properties describe just the ONC properties that can be configured |
22 // through this API. NOTE: Not all configuration properties are exposed at this | 22 // through this API. NOTE: Not all configuration properties are exposed at this |
23 // time, only those currently required by the Chrome Settings UI. | 23 // time, only those currently required by the Chrome Settings UI. |
24 // TODO(stevenjb): Provide all configuration properties and types, | |
25 // crbug.com/380937. | |
26 // <br><br> | 24 // <br><br> |
27 // TODO(stevenjb/pneubeck): Merge the ONC documentation with this document and | |
28 // use it as the ONC specification. | |
stevenjb
2017/05/02 00:17:45
revert
| |
29 | 25 |
30 namespace networkingPrivate { | 26 namespace networkingPrivate { |
31 enum ActivationStateType { | 27 enum ActivationStateType { |
32 Activated, Activating, NotActivated, PartiallyActivated | 28 Activated, Activating, NotActivated, PartiallyActivated |
33 }; | 29 }; |
34 | 30 |
35 enum CaptivePortalStatus { | 31 enum CaptivePortalStatus { |
36 Unknown, Offline, Online, Portal, ProxyAuthRequired | 32 Unknown, Offline, Online, Portal, ProxyAuthRequired |
37 }; | 33 }; |
38 | 34 |
(...skipping 790 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
829 boolean? AllowOnlyPolicyNetworksToAutoconnect; | 825 boolean? AllowOnlyPolicyNetworksToAutoconnect; |
830 | 826 |
831 // If true, only policy networks may be connected to and no new networks may | 827 // If true, only policy networks may be connected to and no new networks may |
832 // be added or configured. Defaults to false. | 828 // be added or configured. Defaults to false. |
833 boolean? AllowOnlyPolicyNetworksToConnect; | 829 boolean? AllowOnlyPolicyNetworksToConnect; |
834 }; | 830 }; |
835 | 831 |
836 callback VoidCallback = void(); | 832 callback VoidCallback = void(); |
837 callback BooleanCallback = void(boolean result); | 833 callback BooleanCallback = void(boolean result); |
838 callback StringCallback = void(DOMString result); | 834 callback StringCallback = void(DOMString result); |
839 // TODO(stevenjb): Use NetworkProperties for |result| once defined. | |
840 callback GetPropertiesCallback = void(NetworkProperties result); | 835 callback GetPropertiesCallback = void(NetworkProperties result); |
841 // TODO(stevenjb): Use ManagedNetworkProperties for |result| once defined. | |
842 callback GetManagedPropertiesCallback = void(ManagedProperties result); | 836 callback GetManagedPropertiesCallback = void(ManagedProperties result); |
843 callback GetStatePropertiesCallback = void(NetworkStateProperties result); | 837 callback GetStatePropertiesCallback = void(NetworkStateProperties result); |
844 callback GetNetworksCallback = void(NetworkStateProperties[] result); | 838 callback GetNetworksCallback = void(NetworkStateProperties[] result); |
845 callback GetDeviceStatesCallback = void(DeviceStateProperties[] result); | 839 callback GetDeviceStatesCallback = void(DeviceStateProperties[] result); |
846 callback GetEnabledNetworkTypesCallback = void(NetworkType[] result); | 840 callback GetEnabledNetworkTypesCallback = void(NetworkType[] result); |
847 callback CaptivePortalStatusCallback = void(CaptivePortalStatus result); | 841 callback CaptivePortalStatusCallback = void(CaptivePortalStatus result); |
848 callback GetGlobalPolicyCallback = void(GlobalPolicy result); | 842 callback GetGlobalPolicyCallback = void(GlobalPolicy result); |
849 | 843 |
850 // These functions all report failures via chrome.runtime.lastError. | 844 // These functions all report failures via chrome.runtime.lastError. |
851 interface Functions { | 845 interface Functions { |
(...skipping 233 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1085 // Fired when the list of devices has changed or any device state properties | 1079 // Fired when the list of devices has changed or any device state properties |
1086 // have changed. | 1080 // have changed. |
1087 static void onDeviceStateListChanged(); | 1081 static void onDeviceStateListChanged(); |
1088 | 1082 |
1089 // Fired when a portal detection for a network completes. Sends the guid of | 1083 // Fired when a portal detection for a network completes. Sends the guid of |
1090 // the network and the corresponding captive portal status. | 1084 // the network and the corresponding captive portal status. |
1091 static void onPortalDetectionCompleted(DOMString networkGuid, | 1085 static void onPortalDetectionCompleted(DOMString networkGuid, |
1092 CaptivePortalStatus status); | 1086 CaptivePortalStatus status); |
1093 }; | 1087 }; |
1094 }; | 1088 }; |
OLD | NEW |