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

Unified 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/local_discovery/wifi/wifi_manager_nonchromeos.h
diff --git a/chrome/browser/local_discovery/wifi/wifi_manager_nonchromeos.h b/chrome/browser/local_discovery/wifi/wifi_manager_nonchromeos.h
new file mode 100644
index 0000000000000000000000000000000000000000..408cd3f840d9765a95436a9e99df6a7384bec7fb
--- /dev/null
+++ b/chrome/browser/local_discovery/wifi/wifi_manager_nonchromeos.h
@@ -0,0 +1,71 @@
+// Copyright 2014 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef CHROME_BROWSER_LOCAL_DISCOVERY_WIFI_WIFI_MANAGER_NONCHROMEOS_H_
+#define CHROME_BROWSER_LOCAL_DISCOVERY_WIFI_WIFI_MANAGER_NONCHROMEOS_H_
+
+#include <string>
+#include <vector>
+
+#include "base/callback.h"
+#include "base/memory/scoped_ptr.h"
+#include "base/memory/weak_ptr.h"
+#include "base/observer_list.h"
+#include "chrome/browser/local_discovery/wifi/wifi_manager.h"
+#include "content/public/browser/browser_thread.h"
+
+namespace local_discovery {
+
+namespace wifi {
+
+class WifiManagerNonChromeos : public WifiManager {
+ public:
+ explicit WifiManagerNonChromeos();
Vitaly Buka (NO REVIEWS) 2014/05/23 17:49:16 -explicit
Noam Samuel 2014/05/24 00:15:39 Done.
+ virtual ~WifiManagerNonChromeos();
+
+ // WifiManager implementation.
+ virtual void Start() OVERRIDE;
+ virtual void GetSSIDList(const SSIDListCallback& callback) OVERRIDE;
+ virtual void RequestScan() OVERRIDE;
+ virtual void ConfigureAndConnectNetwork(
+ const std::string& ssid,
+ const WifiCredentials& credentials,
+ const SuccessCallback& callback) OVERRIDE;
+ virtual void ConnectToNetworkByID(const std::string& internal_id,
+ const SuccessCallback& callback) OVERRIDE;
+ virtual void RequestNetworkCredentials(
+ const std::string& internal_id,
+ const CredentialsCallback& callback) OVERRIDE;
+ virtual scoped_ptr<NetworkListWatcher> CreateNetworkListWatcher(
+ const SSIDListCallback& callback) OVERRIDE;
+
+ private:
+ class WifiServiceWrapper;
+ class NetworkListWatcherImpl;
+
+ // Called when the network list changes. Used for NetworkListWatcher.
+ void OnNetworkListChanged(const std::vector<NetworkProperties>& ssid_list);
+
+ // Used to ensure closures posted from the wifi threads aren't called after
+ // the service client is deleted.
+ void PostClosure(const base::Closure& callback);
+
+ void AddObserver(NetworkListWatcherImpl* observer);
+ void RemoveObserver(NetworkListWatcherImpl* observer);
stevenjb 2014/05/23 16:42:40 This is a little odd now, confusing the "watcher"
+
+ std::string original_guid_;
+ scoped_refptr<base::SequencedTaskRunner> task_runner_;
+ 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
+ ObserverList<NetworkListWatcherImpl> network_list_observers_;
+
+ base::WeakPtrFactory<WifiManagerNonChromeos> weak_factory_;
+
+ DISALLOW_COPY_AND_ASSIGN(WifiManagerNonChromeos);
+};
+
+} // namespace wifi
+
+} // namespace local_discovery
+
+#endif // CHROME_BROWSER_LOCAL_DISCOVERY_WIFI_WIFI_MANAGER_NONCHROMEOS_H_

Powered by Google App Engine
This is Rietveld 408576698