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

Side by Side Diff: chrome/browser/extensions/api/gcd_private/gcd_private_api.h

Issue 427123002: Added function to get list of networks with prefetched passwords (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@wifi_session1
Patch Set: Created 6 years, 4 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
« no previous file with comments | « no previous file | chrome/browser/extensions/api/gcd_private/gcd_private_api.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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 #ifndef CHROME_BROWSER_EXTENSIONS_API_GCD_PRIVATE_GCD_PRIVATE_API_H_ 5 #ifndef CHROME_BROWSER_EXTENSIONS_API_GCD_PRIVATE_GCD_PRIVATE_API_H_
6 #define CHROME_BROWSER_EXTENSIONS_API_GCD_PRIVATE_GCD_PRIVATE_API_H_ 6 #define CHROME_BROWSER_EXTENSIONS_API_GCD_PRIVATE_GCD_PRIVATE_API_H_
7 7
8 #include "base/memory/linked_ptr.h" 8 #include "base/memory/linked_ptr.h"
9 #include "base/memory/scoped_ptr.h" 9 #include "base/memory/scoped_ptr.h"
10 #include "chrome/browser/extensions/chrome_extension_function.h" 10 #include "chrome/browser/extensions/chrome_extension_function.h"
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
70 void SendMessage(int session_id, 70 void SendMessage(int session_id,
71 const std::string& api, 71 const std::string& api,
72 const base::DictionaryValue& input, 72 const base::DictionaryValue& input,
73 MessageResponseCallback callback); 73 MessageResponseCallback callback);
74 74
75 void RemoveSession(int session_id); 75 void RemoveSession(int session_id);
76 76
77 void RequestWifiPassword(const std::string& ssid, 77 void RequestWifiPassword(const std::string& ssid,
78 const SuccessCallback& callback); 78 const SuccessCallback& callback);
79 79
80 scoped_ptr<base::ListValue> GetPrefetchedSSIDList();
81
80 private: 82 private:
81 friend class BrowserContextKeyedAPIFactory<GcdPrivateAPI>; 83 friend class BrowserContextKeyedAPIFactory<GcdPrivateAPI>;
82 84
83 typedef std::map<std::string /* id_string */, 85 typedef std::map<std::string /* id_string */,
84 linked_ptr<api::gcd_private::GCDDevice> > GCDDeviceMap; 86 linked_ptr<api::gcd_private::GCDDevice> > GCDDeviceMap;
85 87
86 typedef std::map<int /* session id*/, linked_ptr<GcdPrivateSessionHolder> > 88 typedef std::map<int /* session id*/, linked_ptr<GcdPrivateSessionHolder> >
87 GCDSessionMap; 89 GCDSessionMap;
88 90
89 typedef std::map<std::string /* ssid */, std::string /* password */> 91 typedef std::map<std::string /* ssid */, std::string /* password */>
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after
189 191
190 protected: 192 protected:
191 virtual ~GcdPrivatePrefetchWifiPasswordFunction(); 193 virtual ~GcdPrivatePrefetchWifiPasswordFunction();
192 194
193 // AsyncExtensionFunction overrides. 195 // AsyncExtensionFunction overrides.
194 virtual bool RunAsync() OVERRIDE; 196 virtual bool RunAsync() OVERRIDE;
195 197
196 void OnResponse(bool response); 198 void OnResponse(bool response);
197 }; 199 };
198 200
201 class GcdPrivateGetPrefetchedWifiNameListFunction
202 : public ChromeSyncExtensionFunction {
203 public:
204 DECLARE_EXTENSION_FUNCTION("gcdPrivate.getPrefetchedWifiNameList",
205 GCDPRIVATE_GETPREFETCHEDWIFINAMELIST);
206
207 GcdPrivateGetPrefetchedWifiNameListFunction();
208
209 protected:
210 virtual ~GcdPrivateGetPrefetchedWifiNameListFunction();
211
212 // SyncExtensionFunction overrides.
213 virtual bool RunSync() OVERRIDE;
214 };
215
199 class GcdPrivateEstablishSessionFunction : public ChromeAsyncExtensionFunction { 216 class GcdPrivateEstablishSessionFunction : public ChromeAsyncExtensionFunction {
200 public: 217 public:
201 DECLARE_EXTENSION_FUNCTION("gcdPrivate.establishSession", 218 DECLARE_EXTENSION_FUNCTION("gcdPrivate.establishSession",
202 GCDPRIVATE_ESTABLISHSESSION) 219 GCDPRIVATE_ESTABLISHSESSION)
203 220
204 GcdPrivateEstablishSessionFunction(); 221 GcdPrivateEstablishSessionFunction();
205 222
206 protected: 223 protected:
207 virtual ~GcdPrivateEstablishSessionFunction(); 224 virtual ~GcdPrivateEstablishSessionFunction();
208 225
(...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after
340 357
341 // AsyncExtensionFunction overrides. 358 // AsyncExtensionFunction overrides.
342 virtual bool RunAsync() OVERRIDE; 359 virtual bool RunAsync() OVERRIDE;
343 360
344 private: 361 private:
345 }; 362 };
346 363
347 } // namespace extensions 364 } // namespace extensions
348 365
349 #endif // CHROME_BROWSER_EXTENSIONS_API_GCD_PRIVATE_GCD_PRIVATE_API_H_ 366 #endif // CHROME_BROWSER_EXTENSIONS_API_GCD_PRIVATE_GCD_PRIVATE_API_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/extensions/api/gcd_private/gcd_private_api.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698