summaryrefslogtreecommitdiffstats
path: root/chromecast
diff options
context:
space:
mode:
authorgfhuang <gfhuang@chromium.org>2016-01-04 17:42:26 -0800
committerCommit bot <commit-bot@chromium.org>2016-01-05 01:43:57 +0000
commit2a984ce7e3cd1ee16537da3fdf14023eee621bba (patch)
tree829021846128da4f6d9c3a90d6e5f4cc17d91e24 /chromecast
parent579095de25074b7d7fc365dd70494da4c840fa08 (diff)
downloadchromium_src-2a984ce7e3cd1ee16537da3fdf14023eee621bba.zip
chromium_src-2a984ce7e3cd1ee16537da3fdf14023eee621bba.tar.gz
chromium_src-2a984ce7e3cd1ee16537da3fdf14023eee621bba.tar.bz2
[Chromecast] Add wake-on-cast related API to AvSettings.
BUG= internal b/25949873 Review URL: https://codereview.chromium.org/1559483003 Cr-Commit-Position: refs/heads/master@{#367454}
Diffstat (limited to 'chromecast')
-rw-r--r--chromecast/public/avsettings.h20
1 files changed, 20 insertions, 0 deletions
diff --git a/chromecast/public/avsettings.h b/chromecast/public/avsettings.h
index 22caad9..d0e71b7 100644
--- a/chromecast/public/avsettings.h
+++ b/chromecast/public/avsettings.h
@@ -54,6 +54,15 @@ class AvSettings {
FIXED_VOLUME,
};
+ // Defines the status of platform wake-on-cast feature.
+ enum WakeOnCastStatus {
+ WAKE_ON_CAST_UNKNOWN, // Should only been used very rarely when platform
+ // has error to get the status.
+ WAKE_ON_CAST_NOT_SUPPORTED, // Platform doesn't support wake-on-cast.
+ WAKE_ON_CAST_DISABLED,
+ WAKE_ON_CAST_ENABLED,
+ };
+
enum Event {
// This event shall be fired whenever the active state is changed including
// when the screen turned on, when the cast receiver (or the device where
@@ -94,6 +103,10 @@ class AvSettings {
// disconnected to HDMI sinks
AUDIO_VOLUME_CONTROL_TYPE_CHANGED = 5,
+ // This event shall be fired whenever wake-on-cast status is changed by
+ // platform.
+ WAKE_ON_CAST_CHANGED = 6,
+
// This event should be fired when the device is connected to HDMI sinks.
HDMI_CONNECTED = 100,
@@ -205,6 +218,13 @@ class AvSettings {
// if they result in a change of active restrictions.
virtual void ApplyOutputRestrictions(
const OutputRestrictions& restrictions) = 0;
+
+ // Returns current Wake-On-Cast status from platform.
+ virtual WakeOnCastStatus GetWakeOnCastStatus() = 0;
+
+ // Enables/Disables Wake-On-Cast status.
+ // Returns false if failed or not supported.
+ virtual bool EnableWakeOnCast(bool enabled) = 0;
};
} // namespace chromecast