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

Side by Side Diff: chrome/browser/local_discovery/wifi/wifi_manager_nonchromeos.h

Issue 226883002: WiFi client for GCD bootstrapping (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 #ifndef CHROME_BROWSER_LOCAL_DISCOVERY_WIFI_WIFI_MANAGER_NONCHROMEOS_H_
6 #define CHROME_BROWSER_LOCAL_DISCOVERY_WIFI_WIFI_MANAGER_NONCHROMEOS_H_
7
8 #include <string>
9 #include <vector>
10
11 #include "base/callback.h"
12 #include "base/memory/scoped_ptr.h"
13 #include "base/memory/weak_ptr.h"
14 #include "base/observer_list.h"
15 #include "chrome/browser/local_discovery/wifi/wifi_manager.h"
16 #include "content/public/browser/browser_thread.h"
17
18 namespace local_discovery {
19
20 namespace wifi {
21
22 class WifiServiceWrapper;
23
stevenjb 2014/05/15 18:16:26 nit: no WS between declarations
Noam Samuel 2014/05/20 21:19:53 Done.
24 class NetworkListObserverNonChromeos;
25
26 class WifiManagerNonChromeos : public WifiManager {
27 public:
28 explicit WifiManagerNonChromeos();
29 virtual ~WifiManagerNonChromeos();
30
31 // WifiManager implementation.
32 virtual void Start() OVERRIDE;
33
stevenjb 2014/05/15 18:16:26 nit: either no WS between method declarations (my
Noam Samuel 2014/05/20 21:19:53 Done.
34 virtual void GetSSIDList(const SSIDListCallback& callback) OVERRIDE;
35 virtual void RequestScan(const base::Closure& callback) OVERRIDE;
36
37 virtual void ConnectToNetwork(const std::string& ssid,
38 const WifiCredentials& credentials,
39 const SuccessCallback& callback) OVERRIDE;
40
41 virtual void ConnectToNetworkByID(const std::string& internal_id,
42 const SuccessCallback& callback) OVERRIDE;
43
44 virtual void GetNetworkCredentials(
45 const std::string& internal_id,
46 const CredentialsCallback& callback) OVERRIDE;
47
48 virtual scoped_ptr<NetworkListObserver> CreateNetworkListObserver(
49 const SSIDListCallback& callback) OVERRIDE;
50
51 void AddObserver(NetworkListObserverNonChromeos* observer);
52
53 void RemoveObserver(NetworkListObserverNonChromeos* observer);
54
55 private:
56 // Called when the network list changes. Used for NetworkListObserver.
57 void OnNetworkListChanged(const std::vector<NetworkProperties>& ssid_list);
58
59 // Used to ensure closures posted from the wifi threads aren't called after
60 // the service client is deleted.
61 void PostClosure(const base::Closure& callback);
62
63 std::string original_guid_;
64 scoped_refptr<base::SequencedTaskRunner> task_runner_;
65 WifiServiceWrapper* wifi_wrapper_;
66 ObserverList<NetworkListObserverNonChromeos> network_list_observers_;
67
68 base::WeakPtrFactory<WifiManagerNonChromeos> weak_factory_;
stevenjb 2014/05/15 18:16:26 DISALLOW_COPY_AND_ASSIGN
Noam Samuel 2014/05/20 21:19:53 Done.
69 };
70
71 } // namespace wifi
72
73 } // namespace local_discovery
74
75 #endif // CHROME_BROWSER_LOCAL_DISCOVERY_WIFI_WIFI_MANAGER_NONCHROMEOS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698