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

Unified Diff: chrome/browser/chromeos/net/wake_on_wifi_manager.h

Issue 811973002: Enable lucid sleep (wake on wi-fi SSID) and add to Privacy options. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: add function to chromeos::switches. rebase Created 6 years 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
« no previous file with comments | « chrome/app/chromeos_strings.grdp ('k') | chrome/browser/chromeos/net/wake_on_wifi_manager.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/chromeos/net/wake_on_wifi_manager.h
diff --git a/chrome/browser/chromeos/net/wake_on_wifi_manager.h b/chrome/browser/chromeos/net/wake_on_wifi_manager.h
index 1b68c3c27b50a3765486cc5ccb3ef06179e90f3f..ea9de92f62410318f80c9d13826ecef2c5529256 100644
--- a/chrome/browser/chromeos/net/wake_on_wifi_manager.h
+++ b/chrome/browser/chromeos/net/wake_on_wifi_manager.h
@@ -7,11 +7,16 @@
#include "base/containers/scoped_ptr_hash_map.h"
#include "base/macros.h"
+#include "base/memory/weak_ptr.h"
#include "content/public/browser/notification_observer.h"
#include "content/public/browser/notification_registrar.h"
class Profile;
+namespace base {
+class DictionaryValue;
+}
+
namespace chromeos {
// This class is responsible for managing the various wake-on-wifi related bits
@@ -23,11 +28,12 @@ namespace chromeos {
class WakeOnWifiManager : public content::NotificationObserver {
public:
enum WakeOnWifiFeature {
- WAKE_ON_NONE = 0,
- WAKE_ON_PACKET = 1,
- WAKE_ON_SSID = 2,
- WAKE_ON_PACKET_AND_SSID = 3,
- INVALID = 4,
+ WAKE_ON_NONE = 0x00,
+ WAKE_ON_PACKET = 0x01,
+ WAKE_ON_SSID = 0x02,
+ WAKE_ON_PACKET_AND_SSID = 0x03,
+ NOT_SUPPORTED = 0x04,
+ INVALID = 0x08,
};
static WakeOnWifiManager* Get();
@@ -39,6 +45,14 @@ class WakeOnWifiManager : public content::NotificationObserver {
// wake-on-wifi features that should be enabled.
void OnPreferenceChanged(WakeOnWifiFeature feature);
+ // Returns true if wake-on-wifi features are supported. Returns false if we
+ // have not yet determined whether wake-on-wifi features are supported.
+ bool WakeOnWifiSupported();
+
+ // Callback for getting the Wi-Fi device properties.
+ void GetDevicePropertiesCallback(const std::string& device_path,
+ const base::DictionaryValue& properties);
+
// content::NotificationObserver override.
void Observe(int type,
const content::NotificationSource& source,
@@ -56,6 +70,8 @@ class WakeOnWifiManager : public content::NotificationObserver {
content::NotificationRegistrar registrar_;
+ base::WeakPtrFactory<WakeOnWifiManager> weak_ptr_factory_;
+
DISALLOW_COPY_AND_ASSIGN(WakeOnWifiManager);
};
« no previous file with comments | « chrome/app/chromeos_strings.grdp ('k') | chrome/browser/chromeos/net/wake_on_wifi_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698