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

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 WifiManagerNonChromeos : public WifiManager {
23 public:
24 explicit WifiManagerNonChromeos();
Vitaly Buka (NO REVIEWS) 2014/05/23 17:49:16 -explicit
Noam Samuel 2014/05/24 00:15:39 Done.
25 virtual ~WifiManagerNonChromeos();
26
27 // WifiManager implementation.
28 virtual void Start() OVERRIDE;
29 virtual void GetSSIDList(const SSIDListCallback& callback) OVERRIDE;
30 virtual void RequestScan() OVERRIDE;
31 virtual void ConfigureAndConnectNetwork(
32 const std::string& ssid,
33 const WifiCredentials& credentials,
34 const SuccessCallback& callback) OVERRIDE;
35 virtual void ConnectToNetworkByID(const std::string& internal_id,
36 const SuccessCallback& callback) OVERRIDE;
37 virtual void RequestNetworkCredentials(
38 const std::string& internal_id,
39 const CredentialsCallback& callback) OVERRIDE;
40 virtual scoped_ptr<NetworkListWatcher> CreateNetworkListWatcher(
41 const SSIDListCallback& callback) OVERRIDE;
42
43 private:
44 class WifiServiceWrapper;
45 class NetworkListWatcherImpl;
46
47 // Called when the network list changes. Used for NetworkListWatcher.
48 void OnNetworkListChanged(const std::vector<NetworkProperties>& ssid_list);
49
50 // Used to ensure closures posted from the wifi threads aren't called after
51 // the service client is deleted.
52 void PostClosure(const base::Closure& callback);
53
54 void AddObserver(NetworkListWatcherImpl* observer);
55 void RemoveObserver(NetworkListWatcherImpl* observer);
stevenjb 2014/05/23 16:42:40 This is a little odd now, confusing the "watcher"
56
57 std::string original_guid_;
58 scoped_refptr<base::SequencedTaskRunner> task_runner_;
59 WifiServiceWrapper* wifi_wrapper_;
Vitaly Buka (NO REVIEWS) 2014/05/23 17:49:16 scoped_ptr<WifiServiceWrapper>
Noam Samuel 2014/05/24 00:15:39 Deleted on a different thread. Added comment. Orig
60 ObserverList<NetworkListWatcherImpl> network_list_observers_;
61
62 base::WeakPtrFactory<WifiManagerNonChromeos> weak_factory_;
63
64 DISALLOW_COPY_AND_ASSIGN(WifiManagerNonChromeos);
65 };
66
67 } // namespace wifi
68
69 } // namespace local_discovery
70
71 #endif // CHROME_BROWSER_LOCAL_DISCOVERY_WIFI_WIFI_MANAGER_NONCHROMEOS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698