Chromium Code Reviews| 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..b15cb42fdb853cb7d180eb1dd899468fed1c060d |
| --- /dev/null |
| +++ b/chrome/browser/local_discovery/wifi/wifi_manager_nonchromeos.h |
| @@ -0,0 +1,75 @@ |
| +// 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 WifiServiceWrapper; |
| + |
|
stevenjb
2014/05/15 18:16:26
nit: no WS between declarations
Noam Samuel
2014/05/20 21:19:53
Done.
|
| +class NetworkListObserverNonChromeos; |
| + |
| +class WifiManagerNonChromeos : public WifiManager { |
| + public: |
| + explicit WifiManagerNonChromeos(); |
| + virtual ~WifiManagerNonChromeos(); |
| + |
| + // WifiManager implementation. |
| + virtual void Start() OVERRIDE; |
| + |
|
stevenjb
2014/05/15 18:16:26
nit: either no WS between method declarations (my
Noam Samuel
2014/05/20 21:19:53
Done.
|
| + virtual void GetSSIDList(const SSIDListCallback& callback) OVERRIDE; |
| + virtual void RequestScan(const base::Closure& callback) OVERRIDE; |
| + |
| + virtual void ConnectToNetwork(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 GetNetworkCredentials( |
| + const std::string& internal_id, |
| + const CredentialsCallback& callback) OVERRIDE; |
| + |
| + virtual scoped_ptr<NetworkListObserver> CreateNetworkListObserver( |
| + const SSIDListCallback& callback) OVERRIDE; |
| + |
| + void AddObserver(NetworkListObserverNonChromeos* observer); |
| + |
| + void RemoveObserver(NetworkListObserverNonChromeos* observer); |
| + |
| + private: |
| + // Called when the network list changes. Used for NetworkListObserver. |
| + 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); |
| + |
| + std::string original_guid_; |
| + scoped_refptr<base::SequencedTaskRunner> task_runner_; |
| + WifiServiceWrapper* wifi_wrapper_; |
| + ObserverList<NetworkListObserverNonChromeos> network_list_observers_; |
| + |
| + 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.
|
| +}; |
| + |
| +} // namespace wifi |
| + |
| +} // namespace local_discovery |
| + |
| +#endif // CHROME_BROWSER_LOCAL_DISCOVERY_WIFI_WIFI_MANAGER_NONCHROMEOS_H_ |