Index: chrome/utility/networking_private_handler.h |
diff --git a/chrome/utility/networking_private_handler.h b/chrome/utility/networking_private_handler.h |
new file mode 100644 |
index 0000000000000000000000000000000000000000..3e135aeef198b303a2f4d6f1a14936028581dc6e |
--- /dev/null |
+++ b/chrome/utility/networking_private_handler.h |
@@ -0,0 +1,97 @@ |
+// Copyright (c) 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. |
+ |
+#ifndef CHROME_UTILITY_NETWORKING_PRIVATE_HANDLER_H_ |
+#define CHROME_UTILITY_NETWORKING_PRIVATE_HANDLER_H_ |
+ |
+#include <string> |
+ |
+#include "base/basictypes.h" |
+#include "base/compiler_specific.h" |
+#include "base/memory/ref_counted.h" |
+#include "base/memory/scoped_ptr.h" |
+#include "chrome/utility/utility_message_handler.h" |
+#include "chrome/utility/wifi/wifi_service.h" |
+ |
+namespace base { |
+class DictionaryValue; |
+class Thread; |
+} |
+ |
+namespace chrome { |
+ |
+// Dispatches IPCs for out of process profile import. |
Jorge Lucangeli Obes
2013/09/11 17:30:02
Outdated comment.
mef
2013/09/11 20:55:08
Done.
|
+class NetworkingPrivateHandler : public UtilityMessageHandler { |
+ public: |
+ NetworkingPrivateHandler(); |
+ virtual ~NetworkingPrivateHandler(); |
+ |
+ // IPC::Listener: |
+ virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE; |
+ |
+ static bool Send(IPC::Message* message); |
+ |
+ private: |
+ void OnUseWiFiServiceMock(const base::DictionaryValue& parameters); |
+ |
+ void OnGetPropertiesStart(const std::string& network_guid); |
+ void OnGetPropertiesSucceeded( |
+ const std::string& network_guid, |
+ const WiFiService::NetworkProperties& properties); |
+ void OnGetPropertiesFailed(const std::string& error_name, |
+ scoped_ptr<base::DictionaryValue> error_data); |
+ |
+ void OnSetPropertiesStart(const std::string& network_guid, |
+ const base::DictionaryValue& properties); |
+ void OnSetPropertiesSucceeded(const std::string& network_guid); |
+ void OnSetPropertiesFailed(const std::string& error_name, |
+ scoped_ptr<base::DictionaryValue> error_data); |
+ |
+ void OnStartConnectStart(const std::string& network_guid); |
+ void OnStartConnectNetworkScanSucceeded( |
+ const std::string& network_guid, |
+ const WiFiService::NetworkList& network_list); |
+ void OnStartConnectSucceeded(const std::string& network_guid); |
+ void OnStartConnectFailed(const std::string& error_name, |
+ scoped_ptr<base::DictionaryValue> error_data); |
+ |
+ void OnStartDisconnectStart(const std::string& network_guid); |
+ void OnStartDisconnectSucceeded(const std::string& network_guid); |
+ void OnStartDisconnectFailed(const std::string& error_name, |
+ scoped_ptr<base::DictionaryValue> error_data); |
+ |
+ void OnRequestNetworkScan(); |
+ void OnNetworkScanSucceeded(const WiFiService::NetworkList& network_list); |
+ void OnNetworkScanFailed(const std::string& error_name, |
+ scoped_ptr<base::DictionaryValue> error_data); |
+ |
+ void OnGetVisibleNetworks(); |
+ void OnGetVisibleNetworksSucceeded( |
+ const WiFiService::NetworkList& network_list); |
+ void OnGetVisibleNetworksFailed(const std::string& error_name, |
+ scoped_ptr<base::DictionaryValue> error_data); |
+ |
+ void OnNetworkListChangedEvent( |
+ const WiFiService::NetworkGuidList& network_guid_list); |
+ |
+ void OnNetworksChangedEvent( |
+ const WiFiService::NetworkGuidList& network_guid_list); |
+ |
+ |
+ // Private Helper methods. |
+ void WaitForNetworkState(const std::string& network_guid, |
+ WiFiService::ConnectionState expected_state, |
+ int attempt); |
+ void CheckNetworkState(WiFiService::ConnectionState expected_state, |
+ int attempt, |
+ const std::string& network_guid, |
+ const WiFiService::NetworkProperties& properties); |
+ |
+ // Platform-specific WiFi service. |
+ scoped_ptr<WiFiService> wifi_service_; |
+}; |
+ |
+} // namespace chrome |
+ |
+#endif // CHROME_UTILITY_NETWORKING_PRIVATE_HANDLER_H_ |