OLD | NEW |
---|---|
(Empty) | |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | |
2 // Use of this source code is governed by a BSD-style license that can be | |
3 // found in the LICENSE file. | |
4 | |
5 // Multiply-included message file, so no include guard. | |
6 | |
7 #include <string> | |
8 #include <vector> | |
9 | |
10 #include "base/basictypes.h" | |
11 #include "base/values.h" | |
12 #include "ipc/ipc_message_macros.h" | |
13 #include "ipc/ipc_platform_file.h" | |
14 | |
15 #define IPC_MESSAGE_START NetworkingPrivateMsgStart | |
16 | |
17 //------------------------------------------------------------------------------ | |
18 // Utility process messages: | |
19 // These are messages from the browser to the utility process. They are handled | |
20 // by NetworkingPrivateHandler. | |
21 | |
22 // Use WiFiServiceMock instead of WiFiService implementation in browser_tests. | |
23 IPC_MESSAGE_CONTROL1(NetworkingPrivateMsg_UseWiFiServiceMock_ForTest, | |
24 base::DictionaryValue /* parameters */) | |
25 | |
26 // Get properties of the network with given GUID. | |
27 IPC_MESSAGE_CONTROL2(NetworkingPrivateMsg_GetProperties, | |
28 int32, /* message_id */ | |
29 std::string /* network_guid */) | |
30 | |
31 // Set properties of the network with given GUID. | |
32 IPC_MESSAGE_CONTROL3(NetworkingPrivateMsg_SetProperties, | |
33 int32, /* message_id */ | |
34 std::string, /* network_guid */ | |
35 base::DictionaryValue /* properties */) | |
36 | |
37 // Start connect to the network with given GUID. | |
38 IPC_MESSAGE_CONTROL2(NetworkingPrivateMsg_StartConnect, | |
39 int32, /* message_id */ | |
40 std::string /* network_guid */) | |
41 | |
42 // Start disconnect from the network with given GUID. | |
43 IPC_MESSAGE_CONTROL2(NetworkingPrivateMsg_StartDisconnect, | |
44 int32, /* message_id */ | |
45 std::string /* network_guid */) | |
46 | |
47 // Get list of visible networks. | |
48 IPC_MESSAGE_CONTROL1(NetworkingPrivateMsg_GetVisibleNetworks, | |
49 int32 /* message_id */) | |
50 | |
51 // Request new scan of the network. | |
52 IPC_MESSAGE_CONTROL0(NetworkingPrivateMsg_RequestNetworkScan) | |
53 | |
54 //------------------------------------------------------------------------------ | |
55 // Utility process host messages: | |
56 // These are messages from the utility process to the browser. They are handled | |
57 // by NetworkingPrivateClient. | |
58 | |
59 // Reply when the utility process API call has returned an error. | |
60 // |error_code| is a error code string. | |
61 IPC_MESSAGE_CONTROL3(NetworkingPrivateMsg_API_Error, | |
62 int32, /* message_id */ | |
63 std::string, /* error_code, if any */ | |
64 base::DictionaryValue /* error_data, if any */) | |
65 | |
66 // Reply when the utility process is done getting network properties. | |
67 // |properties| are properties convertible to NetworkProperties API object. | |
68 IPC_MESSAGE_CONTROL3(NetworkingPrivateMsg_GetProperties_Succeeded, | |
69 int32, /* message_id */ | |
70 std::string, /* network_guid */ | |
71 base::DictionaryValue /* properties */) | |
72 | |
73 // Reply when the utility process has started connect to network. | |
74 IPC_MESSAGE_CONTROL2(NetworkingPrivateMsg_StartConnect_Succeeded, | |
75 int32, /* message_id */ | |
76 std::string /* network_guid */) | |
77 | |
78 // Reply when the utility process has started disconnect from network. | |
79 IPC_MESSAGE_CONTROL2(NetworkingPrivateMsg_StartDisconnect_Succeeded, | |
80 int32, /* message_id */ | |
81 std::string /* network_guid */) | |
82 | |
83 // Reply when the utility process is done getting network properties. | |
cbentzel
2013/10/16 12:51:36
Nit: s/getting/setting
mef
2013/10/17 02:33:25
Done.
| |
84 IPC_MESSAGE_CONTROL2(NetworkingPrivateMsg_SetProperties_Succeeded, | |
85 int32, /* message_id */ | |
86 std::string /* network_guid */) | |
87 | |
88 // List of visible networks of particular type. | |
89 IPC_MESSAGE_CONTROL2(NetworkingPrivateMsg_GetVisibleNetworksSucceeded, | |
90 int32, /* message_id */ | |
91 base::ListValue /* Network list */) | |
92 | |
93 // Event generated when networks change is detected.. | |
cbentzel
2013/10/16 12:51:36
Nit: extra . at the end.
Is this the list of guid
mef
2013/10/17 02:33:25
Done. Just the changed networks (comment updated).
| |
94 // |network_guids| is list of std::string objects containing network guids. | |
cbentzel
2013/10/16 12:51:36
Nit: I think the comment about |network_guids| is
| |
95 IPC_MESSAGE_CONTROL1(NetworkingPrivateMsg_NetworksChanged_Event, | |
96 std::vector<std::string> /* list of network_guids */) | |
97 | |
98 // Event generated when list of visible networks is changed. | |
cbentzel
2013/10/16 12:51:36
Why does this send guids rather than a ListValue w
mef
2013/10/17 02:33:25
Good question. The NetworkListChanged event only n
| |
99 // |network_guids| is list of std::string objects containing network guids. | |
100 IPC_MESSAGE_CONTROL1(NetworkingPrivateMsg_NetworkListChanged_Event, | |
101 std::vector<std::string> /* list of network_guids */) | |
OLD | NEW |