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

Unified Diff: chrome/common/networking_private_messages.h

Issue 22295002: Base infrastructure for Networking Private API on Windows and Mac. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Use using chromeos:: to avoid lengthy namespace prefixes. Created 7 years, 2 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 side-by-side diff with in-line comments
Download patch
Index: chrome/common/networking_private_messages.h
diff --git a/chrome/common/networking_private_messages.h b/chrome/common/networking_private_messages.h
new file mode 100644
index 0000000000000000000000000000000000000000..7429792b74b5f1de0ea7d403a45db350046d4117
--- /dev/null
+++ b/chrome/common/networking_private_messages.h
@@ -0,0 +1,101 @@
+// Copyright 2013 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Multiply-included message file, so no include guard.
+
+#include <string>
+#include <vector>
+
+#include "base/basictypes.h"
+#include "base/values.h"
+#include "ipc/ipc_message_macros.h"
+#include "ipc/ipc_platform_file.h"
+
+#define IPC_MESSAGE_START NetworkingPrivateMsgStart
+
+//------------------------------------------------------------------------------
+// Utility process messages:
+// These are messages from the browser to the utility process. They are handled
+// by NetworkingPrivateHandler.
+
+// Use WiFiServiceMock instead of WiFiService implementation in browser_tests.
+IPC_MESSAGE_CONTROL1(NetworkingPrivateMsg_UseWiFiServiceMock_ForTest,
+ base::DictionaryValue /* parameters */)
+
+// Get properties of the network with given GUID.
+IPC_MESSAGE_CONTROL2(NetworkingPrivateMsg_GetProperties,
+ int32, /* message_id */
+ std::string /* network_guid */)
+
+// Set properties of the network with given GUID.
+IPC_MESSAGE_CONTROL3(NetworkingPrivateMsg_SetProperties,
+ int32, /* message_id */
+ std::string, /* network_guid */
+ base::DictionaryValue /* properties */)
+
+// Start connect to the network with given GUID.
+IPC_MESSAGE_CONTROL2(NetworkingPrivateMsg_StartConnect,
+ int32, /* message_id */
+ std::string /* network_guid */)
+
+// Start disconnect from the network with given GUID.
+IPC_MESSAGE_CONTROL2(NetworkingPrivateMsg_StartDisconnect,
+ int32, /* message_id */
+ std::string /* network_guid */)
+
+// Get list of visible networks.
+IPC_MESSAGE_CONTROL1(NetworkingPrivateMsg_GetVisibleNetworks,
+ int32 /* message_id */)
+
+// Request new scan of the network.
+IPC_MESSAGE_CONTROL0(NetworkingPrivateMsg_RequestNetworkScan)
+
+//------------------------------------------------------------------------------
+// Utility process host messages:
+// These are messages from the utility process to the browser. They are handled
+// by NetworkingPrivateClient.
+
+// Reply when the utility process API call has returned an error.
+// |error_code| is a error code string.
+IPC_MESSAGE_CONTROL3(NetworkingPrivateMsg_API_Error,
+ int32, /* message_id */
+ std::string, /* error_code, if any */
+ base::DictionaryValue /* error_data, if any */)
+
+// Reply when the utility process is done getting network properties.
+// |properties| are properties convertible to NetworkProperties API object.
+IPC_MESSAGE_CONTROL3(NetworkingPrivateMsg_GetProperties_Succeeded,
+ int32, /* message_id */
+ std::string, /* network_guid */
+ base::DictionaryValue /* properties */)
+
+// Reply when the utility process has started connect to network.
+IPC_MESSAGE_CONTROL2(NetworkingPrivateMsg_StartConnect_Succeeded,
+ int32, /* message_id */
+ std::string /* network_guid */)
+
+// Reply when the utility process has started disconnect from network.
+IPC_MESSAGE_CONTROL2(NetworkingPrivateMsg_StartDisconnect_Succeeded,
+ int32, /* message_id */
+ std::string /* network_guid */)
+
+// 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.
+IPC_MESSAGE_CONTROL2(NetworkingPrivateMsg_SetProperties_Succeeded,
+ int32, /* message_id */
+ std::string /* network_guid */)
+
+// List of visible networks of particular type.
+IPC_MESSAGE_CONTROL2(NetworkingPrivateMsg_GetVisibleNetworksSucceeded,
+ int32, /* message_id */
+ base::ListValue /* Network list */)
+
+// 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).
+// |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
+IPC_MESSAGE_CONTROL1(NetworkingPrivateMsg_NetworksChanged_Event,
+ std::vector<std::string> /* list of network_guids */)
+
+// 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
+// |network_guids| is list of std::string objects containing network guids.
+IPC_MESSAGE_CONTROL1(NetworkingPrivateMsg_NetworkListChanged_Event,
+ std::vector<std::string> /* list of network_guids */)

Powered by Google App Engine
This is Rietveld 408576698