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

Side by Side Diff: extensions/common/api/networking_private.idl

Issue 2620463003: Add getGlobalPolicy to networkingPrivate API. (Closed)
Patch Set: Created 3 years, 11 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 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 788 matching lines...) Expand 10 before | Expand all | Expand 10 after
799 boolean? visible; 799 boolean? visible;
800 800
801 // If true, only include configured (saved) networks. Defaults to 'false'. 801 // If true, only include configured (saved) networks. Defaults to 'false'.
802 boolean? configured; 802 boolean? configured;
803 803
804 // Maximum number of networks to return. Defaults to 1000 if unspecified. 804 // Maximum number of networks to return. Defaults to 1000 if unspecified.
805 // Use 0 for no limit. 805 // Use 0 for no limit.
806 long? limit; 806 long? limit;
807 }; 807 };
808 808
809 dictionary GlobalPolicy {
810 // If true, only allow policy networks to autoconnect. Defaults to false.
tbarzic 2017/01/06 22:43:18 Since this describes state of the system, rather t
stevenjb 2017/01/09 19:30:37 Done.
811 boolean? AllowOnlyPolicyNetworksToAutoconnect;
812
813 // If true, only allow policy networks to connect and no new networks can be
814 // added. Defaults to false.
tbarzic 2017/01/06 22:43:18 I think "configured" would be clearer than "added"
stevenjb 2017/01/09 19:30:37 Done.
815 boolean? AllowOnlyPolicyNetworksToConnect;
816 };
817
809 callback VoidCallback = void(); 818 callback VoidCallback = void();
810 callback BooleanCallback = void(boolean result); 819 callback BooleanCallback = void(boolean result);
811 callback StringCallback = void(DOMString result); 820 callback StringCallback = void(DOMString result);
812 // TODO(stevenjb): Use NetworkProperties for |result| once defined. 821 // TODO(stevenjb): Use NetworkProperties for |result| once defined.
813 callback GetPropertiesCallback = void(NetworkProperties result); 822 callback GetPropertiesCallback = void(NetworkProperties result);
814 // TODO(stevenjb): Use ManagedNetworkProperties for |result| once defined. 823 // TODO(stevenjb): Use ManagedNetworkProperties for |result| once defined.
815 callback GetManagedPropertiesCallback = void(ManagedProperties result); 824 callback GetManagedPropertiesCallback = void(ManagedProperties result);
816 callback GetStatePropertiesCallback = void(NetworkStateProperties result); 825 callback GetStatePropertiesCallback = void(NetworkStateProperties result);
817 callback GetNetworksCallback = void(NetworkStateProperties[] result); 826 callback GetNetworksCallback = void(NetworkStateProperties[] result);
818 callback GetDeviceStatesCallback = void(DeviceStateProperties[] result); 827 callback GetDeviceStatesCallback = void(DeviceStateProperties[] result);
819 callback GetEnabledNetworkTypesCallback = void(NetworkType[] result); 828 callback GetEnabledNetworkTypesCallback = void(NetworkType[] result);
820 callback CaptivePortalStatusCallback = void(CaptivePortalStatus result); 829 callback CaptivePortalStatusCallback = void(CaptivePortalStatus result);
830 callback GetGlobalPolicyCallback = void(GlobalPolicy result);
821 831
822 // These functions all report failures via chrome.runtime.lastError. 832 // These functions all report failures via chrome.runtime.lastError.
823 interface Functions { 833 interface Functions {
824 // Gets all the properties of the network with id networkGuid. Includes all 834 // Gets all the properties of the network with id networkGuid. Includes all
825 // properties of the network (read-only and read/write values). 835 // properties of the network (read-only and read/write values).
826 // |networkGuid|: The GUID of the network to get properties for. 836 // |networkGuid|: The GUID of the network to get properties for.
827 // |callback|: Called with the network properties when received. 837 // |callback|: Called with the network properties when received.
828 static void getProperties(DOMString networkGuid, 838 static void getProperties(DOMString networkGuid,
829 GetPropertiesCallback callback); 839 GetPropertiesCallback callback);
830 840
(...skipping 196 matching lines...) Expand 10 before | Expand all | Expand 10 after
1027 // automatically by the device. NOTE: If the SIM is locked, it must first be 1037 // automatically by the device. NOTE: If the SIM is locked, it must first be
1028 // unlocked with unlockCellularSim() before this can be called (otherwise it 1038 // unlocked with unlockCellularSim() before this can be called (otherwise it
1029 // will fail and chrome.runtime.lastError will be set to Error.SimLocked). 1039 // will fail and chrome.runtime.lastError will be set to Error.SimLocked).
1030 // |networkGuid|: The GUID of the cellular network to set the SIM state of. 1040 // |networkGuid|: The GUID of the cellular network to set the SIM state of.
1031 // If empty, the default cellular device will be used. 1041 // If empty, the default cellular device will be used.
1032 // |simState|: The SIM state to set. 1042 // |simState|: The SIM state to set.
1033 // |callback|: Called when the operation has completed. 1043 // |callback|: Called when the operation has completed.
1034 static void setCellularSimState(DOMString networkGuid, 1044 static void setCellularSimState(DOMString networkGuid,
1035 CellularSimState simState, 1045 CellularSimState simState,
1036 optional VoidCallback callback); 1046 optional VoidCallback callback);
1047
1048 // Get the global policy properties. These properties are not expected to
tbarzic 2017/01/06 22:43:18 suggestion: s/Get/Gets/ s/are not expected to chan
stevenjb 2017/01/09 19:30:37 Fixed Gets. 'Expected to be constant' sounds more
1049 // change during a session.
1050 static void getGlobalPolicy(GetGlobalPolicyCallback callback);
1037 }; 1051 };
1038 1052
1039 interface Events { 1053 interface Events {
1040 // Fired when the properties change on any of the networks. Sends a list of 1054 // Fired when the properties change on any of the networks. Sends a list of
1041 // GUIDs for networks whose properties have changed. 1055 // GUIDs for networks whose properties have changed.
1042 static void onNetworksChanged(DOMString[] changes); 1056 static void onNetworksChanged(DOMString[] changes);
1043 1057
1044 // Fired when the list of networks has changed. Sends a complete list of 1058 // Fired when the list of networks has changed. Sends a complete list of
1045 // GUIDs for all the current networks. 1059 // GUIDs for all the current networks.
1046 static void onNetworkListChanged(DOMString[] changes); 1060 static void onNetworkListChanged(DOMString[] changes);
1047 1061
1048 // Fired when the list of devices has changed or any device state properties 1062 // Fired when the list of devices has changed or any device state properties
1049 // have changed. 1063 // have changed.
1050 static void onDeviceStateListChanged(); 1064 static void onDeviceStateListChanged();
1051 1065
1052 // Fired when a portal detection for a network completes. Sends the guid of 1066 // Fired when a portal detection for a network completes. Sends the guid of
1053 // the network and the corresponding captive portal status. 1067 // the network and the corresponding captive portal status.
1054 static void onPortalDetectionCompleted(DOMString networkGuid, 1068 static void onPortalDetectionCompleted(DOMString networkGuid,
1055 CaptivePortalStatus status); 1069 CaptivePortalStatus status);
1056 }; 1070 };
1057 }; 1071 };
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698