| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 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 | 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 // These classes implement the chrome.networkingPrivate JavaScript extension | 5 // These classes implement the chrome.networkingPrivate JavaScript extension |
| 6 // API. | 6 // API. |
| 7 | 7 |
| 8 #ifndef CHROME_BROWSER_EXTENSIONS_API_NETWORKING_PRIVATE_NETWORKING_PRIVATE_API_
H_ | 8 #ifndef CHROME_BROWSER_EXTENSIONS_API_NETWORKING_PRIVATE_NETWORKING_PRIVATE_API_
H_ |
| 9 #define CHROME_BROWSER_EXTENSIONS_API_NETWORKING_PRIVATE_NETWORKING_PRIVATE_API_
H_ | 9 #define CHROME_BROWSER_EXTENSIONS_API_NETWORKING_PRIVATE_NETWORKING_PRIVATE_API_
H_ |
| 10 | 10 |
| (...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 113 | 113 |
| 114 private: | 114 private: |
| 115 void ErrorCallback(const std::string& error_name, | 115 void ErrorCallback(const std::string& error_name, |
| 116 const scoped_ptr<base::DictionaryValue> error_data); | 116 const scoped_ptr<base::DictionaryValue> error_data); |
| 117 void ResultCallback(const std::string& guid); | 117 void ResultCallback(const std::string& guid); |
| 118 DISALLOW_COPY_AND_ASSIGN(NetworkingPrivateCreateNetworkFunction); | 118 DISALLOW_COPY_AND_ASSIGN(NetworkingPrivateCreateNetworkFunction); |
| 119 }; | 119 }; |
| 120 | 120 |
| 121 // Implements the chrome.networkingPrivate.getVisibleNetworks method. | 121 // Implements the chrome.networkingPrivate.getVisibleNetworks method. |
| 122 class NetworkingPrivateGetVisibleNetworksFunction | 122 class NetworkingPrivateGetVisibleNetworksFunction |
| 123 : public SyncExtensionFunction { | 123 : public AsyncExtensionFunction { |
| 124 public: | 124 public: |
| 125 NetworkingPrivateGetVisibleNetworksFunction() {} | 125 NetworkingPrivateGetVisibleNetworksFunction() {} |
| 126 DECLARE_EXTENSION_FUNCTION("networkingPrivate.getVisibleNetworks", | 126 DECLARE_EXTENSION_FUNCTION("networkingPrivate.getVisibleNetworks", |
| 127 NETWORKINGPRIVATE_GETVISIBLENETWORKS); | 127 NETWORKINGPRIVATE_GETVISIBLENETWORKS); |
| 128 | 128 |
| 129 protected: | 129 protected: |
| 130 virtual ~NetworkingPrivateGetVisibleNetworksFunction(); | 130 virtual ~NetworkingPrivateGetVisibleNetworksFunction(); |
| 131 | 131 |
| 132 // SyncExtensionFunction overrides. | 132 // AsyncExtensionFunction overrides. |
| 133 virtual bool RunImpl() OVERRIDE; | 133 virtual bool RunImpl() OVERRIDE; |
| 134 | 134 |
| 135 private: | 135 private: |
| 136 void ResultCallback(const base::ListValue& network_list); |
| 137 |
| 136 DISALLOW_COPY_AND_ASSIGN(NetworkingPrivateGetVisibleNetworksFunction); | 138 DISALLOW_COPY_AND_ASSIGN(NetworkingPrivateGetVisibleNetworksFunction); |
| 137 }; | 139 }; |
| 138 | 140 |
| 139 // Implements the chrome.networkingPrivate.getEnabledNetworkTypes method. | 141 // Implements the chrome.networkingPrivate.getEnabledNetworkTypes method. |
| 140 class NetworkingPrivateGetEnabledNetworkTypesFunction | 142 class NetworkingPrivateGetEnabledNetworkTypesFunction |
| 141 : public SyncExtensionFunction { | 143 : public SyncExtensionFunction { |
| 142 public: | 144 public: |
| 143 NetworkingPrivateGetEnabledNetworkTypesFunction() {} | 145 NetworkingPrivateGetEnabledNetworkTypesFunction() {} |
| 144 DECLARE_EXTENSION_FUNCTION("networkingPrivate.getEnabledNetworkTypes", | 146 DECLARE_EXTENSION_FUNCTION("networkingPrivate.getEnabledNetworkTypes", |
| 145 NETWORKINGPRIVATE_GETENABLEDNETWORKTYPES); | 147 NETWORKINGPRIVATE_GETENABLEDNETWORKTYPES); |
| (...skipping 172 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 318 virtual bool RunImpl() OVERRIDE; | 320 virtual bool RunImpl() OVERRIDE; |
| 319 | 321 |
| 320 void ResultCallback(const std::string& result); | 322 void ResultCallback(const std::string& result); |
| 321 void ErrorCallback(const std::string& error_name, const std::string& error); | 323 void ErrorCallback(const std::string& error_name, const std::string& error); |
| 322 | 324 |
| 323 private: | 325 private: |
| 324 DISALLOW_COPY_AND_ASSIGN(NetworkingPrivateVerifyAndEncryptDataFunction); | 326 DISALLOW_COPY_AND_ASSIGN(NetworkingPrivateVerifyAndEncryptDataFunction); |
| 325 }; | 327 }; |
| 326 | 328 |
| 327 #endif // CHROME_BROWSER_EXTENSIONS_API_NETWORKING_PRIVATE_NETWORKING_PRIVATE_A
PI_H_ | 329 #endif // CHROME_BROWSER_EXTENSIONS_API_NETWORKING_PRIVATE_NETWORKING_PRIVATE_A
PI_H_ |
| OLD | NEW |