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 108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
119 // AsyncExtensionFunction overrides. | 119 // AsyncExtensionFunction overrides. |
120 virtual bool RunAsync() OVERRIDE; | 120 virtual bool RunAsync() OVERRIDE; |
121 | 121 |
122 private: | 122 private: |
123 void ErrorCallback(const std::string& error_name, | 123 void ErrorCallback(const std::string& error_name, |
124 const scoped_ptr<base::DictionaryValue> error_data); | 124 const scoped_ptr<base::DictionaryValue> error_data); |
125 void ResultCallback(const std::string& guid); | 125 void ResultCallback(const std::string& guid); |
126 DISALLOW_COPY_AND_ASSIGN(NetworkingPrivateCreateNetworkFunction); | 126 DISALLOW_COPY_AND_ASSIGN(NetworkingPrivateCreateNetworkFunction); |
127 }; | 127 }; |
128 | 128 |
| 129 // Implements the chrome.networkingPrivate.getNetworks method. |
| 130 class NetworkingPrivateGetNetworksFunction |
| 131 : public ChromeAsyncExtensionFunction { |
| 132 public: |
| 133 NetworkingPrivateGetNetworksFunction() {} |
| 134 DECLARE_EXTENSION_FUNCTION("networkingPrivate.getNetworks", |
| 135 NETWORKINGPRIVATE_GETNETWORKS); |
| 136 |
| 137 protected: |
| 138 virtual ~NetworkingPrivateGetNetworksFunction(); |
| 139 |
| 140 // AsyncExtensionFunction overrides. |
| 141 virtual bool RunAsync() OVERRIDE; |
| 142 |
| 143 private: |
| 144 void ResultCallback(const base::ListValue& network_list); |
| 145 |
| 146 DISALLOW_COPY_AND_ASSIGN(NetworkingPrivateGetNetworksFunction); |
| 147 }; |
| 148 |
129 // Implements the chrome.networkingPrivate.getVisibleNetworks method. | 149 // Implements the chrome.networkingPrivate.getVisibleNetworks method. |
130 class NetworkingPrivateGetVisibleNetworksFunction | 150 class NetworkingPrivateGetVisibleNetworksFunction |
131 : public ChromeAsyncExtensionFunction { | 151 : public ChromeAsyncExtensionFunction { |
132 public: | 152 public: |
133 NetworkingPrivateGetVisibleNetworksFunction() {} | 153 NetworkingPrivateGetVisibleNetworksFunction() {} |
134 DECLARE_EXTENSION_FUNCTION("networkingPrivate.getVisibleNetworks", | 154 DECLARE_EXTENSION_FUNCTION("networkingPrivate.getVisibleNetworks", |
135 NETWORKINGPRIVATE_GETVISIBLENETWORKS); | 155 NETWORKINGPRIVATE_GETVISIBLENETWORKS); |
136 | 156 |
137 protected: | 157 protected: |
138 virtual ~NetworkingPrivateGetVisibleNetworksFunction(); | 158 virtual ~NetworkingPrivateGetVisibleNetworksFunction(); |
(...skipping 251 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
390 virtual bool RunAsync() OVERRIDE; | 410 virtual bool RunAsync() OVERRIDE; |
391 | 411 |
392 protected: | 412 protected: |
393 virtual ~NetworkingPrivateGetCaptivePortalStatusFunction(); | 413 virtual ~NetworkingPrivateGetCaptivePortalStatusFunction(); |
394 | 414 |
395 private: | 415 private: |
396 DISALLOW_COPY_AND_ASSIGN(NetworkingPrivateGetCaptivePortalStatusFunction); | 416 DISALLOW_COPY_AND_ASSIGN(NetworkingPrivateGetCaptivePortalStatusFunction); |
397 }; | 417 }; |
398 | 418 |
399 #endif // CHROME_BROWSER_EXTENSIONS_API_NETWORKING_PRIVATE_NETWORKING_PRIVATE_A
PI_H_ | 419 #endif // CHROME_BROWSER_EXTENSIONS_API_NETWORKING_PRIVATE_NETWORKING_PRIVATE_A
PI_H_ |
OLD | NEW |