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.requestNetworkScan method. | 141 // Implements the chrome.networkingPrivate.requestNetworkScan method. |
140 class NetworkingPrivateRequestNetworkScanFunction | 142 class NetworkingPrivateRequestNetworkScanFunction |
141 : public SyncExtensionFunction { | 143 : public SyncExtensionFunction { |
142 public: | 144 public: |
143 NetworkingPrivateRequestNetworkScanFunction() {} | 145 NetworkingPrivateRequestNetworkScanFunction() {} |
144 DECLARE_EXTENSION_FUNCTION("networkingPrivate.requestNetworkScan", | 146 DECLARE_EXTENSION_FUNCTION("networkingPrivate.requestNetworkScan", |
145 NETWORKINGPRIVATE_REQUESTNETWORKSCAN); | 147 NETWORKINGPRIVATE_REQUESTNETWORKSCAN); |
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
264 virtual bool RunImpl() OVERRIDE; | 266 virtual bool RunImpl() OVERRIDE; |
265 | 267 |
266 void ResultCallback(const std::string& result); | 268 void ResultCallback(const std::string& result); |
267 void ErrorCallback(const std::string& error_name, const std::string& error); | 269 void ErrorCallback(const std::string& error_name, const std::string& error); |
268 | 270 |
269 private: | 271 private: |
270 DISALLOW_COPY_AND_ASSIGN(NetworkingPrivateVerifyAndEncryptDataFunction); | 272 DISALLOW_COPY_AND_ASSIGN(NetworkingPrivateVerifyAndEncryptDataFunction); |
271 }; | 273 }; |
272 | 274 |
273 #endif // CHROME_BROWSER_EXTENSIONS_API_NETWORKING_PRIVATE_NETWORKING_PRIVATE_A
PI_H_ | 275 #endif // CHROME_BROWSER_EXTENSIONS_API_NETWORKING_PRIVATE_NETWORKING_PRIVATE_A
PI_H_ |
OLD | NEW |