Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(30)

Side by Side Diff: chrome/browser/extensions/api/networking_private/networking_private_api.h

Issue 280023003: Implement networkingPrivate.getNetworks (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix nonchromeos Created 6 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | chrome/browser/extensions/api/networking_private/networking_private_api_chromeos.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/extensions/api/networking_private/networking_private_api_chromeos.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698