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

Side by Side Diff: components/arc/common/net.mojom

Issue 1925083003: Notify ARC of default network changes (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@wifi-change
Patch Set: incorporate code review feedback Created 4 years, 7 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 module arc.mojom; 5 module arc.mojom;
6 6
7 [Extensible] 7 [Extensible]
8 enum NetworkResult { 8 enum NetworkResult {
9 SUCCESS = 0, 9 SUCCESS = 0,
10 FAILURE = 1, 10 FAILURE = 1,
(...skipping 21 matching lines...) Expand all
32 struct ConfiguredNetworkDetails { 32 struct ConfiguredNetworkDetails {
33 string? passphrase; 33 string? passphrase;
34 bool autoconnect; 34 bool autoconnect;
35 }; 35 };
36 36
37 union NetworkDetails { 37 union NetworkDetails {
38 VisibleNetworkDetails visible; 38 VisibleNetworkDetails visible;
39 ConfiguredNetworkDetails configured; 39 ConfiguredNetworkDetails configured;
40 }; 40 };
41 41
42 [Extensible]
43 enum IPAddressType {
44 IPV4,
45 IPV6,
46 };
47
48 struct IPConfiguration {
49 string gateway;
50 string ip_address;
51 array<string> name_servers;
52 int32 routing_prefix;
53 IPAddressType type;
54 string web_proxy_auto_discovery_url;
55 };
56
57 [Extensible]
58 enum SecurityType {
59 NONE,
60 WEP_PSK,
61 WEP_8021X,
62 WPA_PSK,
63 WPA_EAP,
64 };
65
66 struct WiFi {
67 string bssid;
68 int32 frequency;
69 string hex_ssid;
70 bool hidden_ssid;
71 SecurityType security;
72 int32 signal_strength;
73 };
74
75 [Extensible]
76 enum NetworkType {
77 CELLULAR,
78 ETHERNET,
79 VPN,
80 WIFI,
81 WIMAX,
82 };
83
84 struct NetworkConfiguration {
85 // These correspond to ONC properties returned by
86 // chrome.networkingPrivate.getProperties().
87 // See components/onc/docs/onc_spec.html
88 ConnectionStateType connection_state;
89 string guid;
90 array<IPConfiguration>? ip_configs;
91 string? mac_address;
92 NetworkType type;
93 WiFi? wifi;
94 };
95
42 struct WifiConfiguration { 96 struct WifiConfiguration {
43 // These correspond to ONC properties returned by 97 // These correspond to ONC properties returned by
44 // chrome.networkingPrivate.getNetworks() and createNetwork(). 98 // chrome.networkingPrivate.getNetworks() and createNetwork().
45 // See components/onc/docs/onc_spec.html 99 // See components/onc/docs/onc_spec.html
46 100
47 // SSID encoded as a series of hex bytes, e.g. "61626364" 101 // SSID encoded as a series of hex bytes, e.g. "61626364"
48 // This allows for handling SSIDs which are not valid UTF-8 strings. 102 // This allows for handling SSIDs which are not valid UTF-8 strings.
49 [MinVersion=2] string? hexssid@6; 103 [MinVersion=2] string? hexssid@6;
50 104
51 [MinVersion=1] string? guid@5; 105 [MinVersion=1] string? guid@5;
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
95 149
96 // Deletes an existing network. 150 // Deletes an existing network.
97 [MinVersion=4] ForgetNetwork@6(string guid) => (NetworkResult status); 151 [MinVersion=4] ForgetNetwork@6(string guid) => (NetworkResult status);
98 152
99 // Initiates a network connection. If called when connected to a different 153 // Initiates a network connection. If called when connected to a different
100 // network, it will drop the current connection first. 154 // network, it will drop the current connection first.
101 [MinVersion=4] StartConnect@7(string guid) => (NetworkResult status); 155 [MinVersion=4] StartConnect@7(string guid) => (NetworkResult status);
102 156
103 // Disconnects from network |guid|. 157 // Disconnects from network |guid|.
104 [MinVersion=4] StartDisconnect@8(string guid) => (NetworkResult status); 158 [MinVersion=4] StartDisconnect@8(string guid) => (NetworkResult status);
159
160 // Retrieve details (IP, SSID, etc.) about the current network connection.
161 [MinVersion=5] GetDefaultNetwork@9() => (
162 NetworkConfiguration? logical_default,
163 NetworkConfiguration? physical_default);
105 }; 164 };
106 165
107 interface NetInstance { 166 interface NetInstance {
108 // Establishes full-duplex communication with the host. 167 // Establishes full-duplex communication with the host.
109 Init@0(NetHost host_ptr); 168 Init@0(NetHost host_ptr);
110 169
111 // Notifies the instance of a WiFI AP scan being completed. 170 // Notifies the instance of a WiFI AP scan being completed.
112 [MinVersion=1] ScanCompleted@1(); 171 [MinVersion=1] ScanCompleted@1();
172
173 [MinVersion=2] DefaultNetworkChanged@2(
174 NetworkConfiguration? logical_default,
175 NetworkConfiguration? physical_default);
113 }; 176 };
OLDNEW
« no previous file with comments | « no previous file | components/arc/net/arc_net_host_impl.h » ('j') | components/arc/net/arc_net_host_impl.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698