| 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 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 116 | 116 |
| 117 private: | 117 private: |
| 118 void ErrorCallback(const std::string& error_name, | 118 void ErrorCallback(const std::string& error_name, |
| 119 const scoped_ptr<base::DictionaryValue> error_data); | 119 const scoped_ptr<base::DictionaryValue> error_data); |
| 120 void ResultCallback(const std::string& guid); | 120 void ResultCallback(const std::string& guid); |
| 121 DISALLOW_COPY_AND_ASSIGN(NetworkingPrivateCreateNetworkFunction); | 121 DISALLOW_COPY_AND_ASSIGN(NetworkingPrivateCreateNetworkFunction); |
| 122 }; | 122 }; |
| 123 | 123 |
| 124 // Implements the chrome.networkingPrivate.getVisibleNetworks method. | 124 // Implements the chrome.networkingPrivate.getVisibleNetworks method. |
| 125 class NetworkingPrivateGetVisibleNetworksFunction | 125 class NetworkingPrivateGetVisibleNetworksFunction |
| 126 : public ChromeSyncExtensionFunction { | 126 : public ChromeAsyncExtensionFunction { |
| 127 public: | 127 public: |
| 128 NetworkingPrivateGetVisibleNetworksFunction() {} | 128 NetworkingPrivateGetVisibleNetworksFunction() {} |
| 129 DECLARE_EXTENSION_FUNCTION("networkingPrivate.getVisibleNetworks", | 129 DECLARE_EXTENSION_FUNCTION("networkingPrivate.getVisibleNetworks", |
| 130 NETWORKINGPRIVATE_GETVISIBLENETWORKS); | 130 NETWORKINGPRIVATE_GETVISIBLENETWORKS); |
| 131 | 131 |
| 132 protected: | 132 protected: |
| 133 virtual ~NetworkingPrivateGetVisibleNetworksFunction(); | 133 virtual ~NetworkingPrivateGetVisibleNetworksFunction(); |
| 134 | 134 |
| 135 // SyncExtensionFunction overrides. | 135 // AsyncExtensionFunction overrides. |
| 136 virtual bool RunImpl() OVERRIDE; | 136 virtual bool RunImpl() OVERRIDE; |
| 137 | 137 |
| 138 private: | 138 private: |
| 139 void ResultCallback(const base::ListValue& network_list); |
| 140 |
| 139 DISALLOW_COPY_AND_ASSIGN(NetworkingPrivateGetVisibleNetworksFunction); | 141 DISALLOW_COPY_AND_ASSIGN(NetworkingPrivateGetVisibleNetworksFunction); |
| 140 }; | 142 }; |
| 141 | 143 |
| 142 // Implements the chrome.networkingPrivate.getEnabledNetworkTypes method. | 144 // Implements the chrome.networkingPrivate.getEnabledNetworkTypes method. |
| 143 class NetworkingPrivateGetEnabledNetworkTypesFunction | 145 class NetworkingPrivateGetEnabledNetworkTypesFunction |
| 144 : public ChromeSyncExtensionFunction { | 146 : public ChromeSyncExtensionFunction { |
| 145 public: | 147 public: |
| 146 NetworkingPrivateGetEnabledNetworkTypesFunction() {} | 148 NetworkingPrivateGetEnabledNetworkTypesFunction() {} |
| 147 DECLARE_EXTENSION_FUNCTION("networkingPrivate.getEnabledNetworkTypes", | 149 DECLARE_EXTENSION_FUNCTION("networkingPrivate.getEnabledNetworkTypes", |
| 148 NETWORKINGPRIVATE_GETENABLEDNETWORKTYPES); | 150 NETWORKINGPRIVATE_GETENABLEDNETWORKTYPES); |
| (...skipping 173 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 322 virtual bool RunImpl() OVERRIDE; | 324 virtual bool RunImpl() OVERRIDE; |
| 323 | 325 |
| 324 void ResultCallback(const std::string& result); | 326 void ResultCallback(const std::string& result); |
| 325 void ErrorCallback(const std::string& error_name, const std::string& error); | 327 void ErrorCallback(const std::string& error_name, const std::string& error); |
| 326 | 328 |
| 327 private: | 329 private: |
| 328 DISALLOW_COPY_AND_ASSIGN(NetworkingPrivateVerifyAndEncryptDataFunction); | 330 DISALLOW_COPY_AND_ASSIGN(NetworkingPrivateVerifyAndEncryptDataFunction); |
| 329 }; | 331 }; |
| 330 | 332 |
| 331 #endif // CHROME_BROWSER_EXTENSIONS_API_NETWORKING_PRIVATE_NETWORKING_PRIVATE_A
PI_H_ | 333 #endif // CHROME_BROWSER_EXTENSIONS_API_NETWORKING_PRIVATE_NETWORKING_PRIVATE_A
PI_H_ |
| OLD | NEW |