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

Unified Diff: chrome/browser/accessibility_events.cc

Issue 7708025: Adds extension APIs of events on changing volume. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 4 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/accessibility_events.cc
diff --git a/chrome/browser/accessibility_events.cc b/chrome/browser/accessibility_events.cc
index 79a1126e16e399dbd6bdc87eeb46f3de57492d72..04a10b0260c3c689cce6abc152ba55ac8f04e588 100644
--- a/chrome/browser/accessibility_events.cc
+++ b/chrome/browser/accessibility_events.cc
@@ -188,6 +188,24 @@ void AccessibilityListBoxInfo::SerializeToDict(DictionaryValue *dict) const {
dict->SetInteger(keys::kItemCountKey, item_count_);
}
+AccessibilityVolumeInfo::AccessibilityVolumeInfo(Profile* profile,
+ double volume,
+ bool is_mute)
+ : AccessibilityControlInfo(profile, "volume"),
+ volume_(volume),
+ is_mute_(is_mute) {
+}
+
+const char* AccessibilityVolumeInfo::type() const {
+ return keys::kTypeVolume;
+}
+
+void AccessibilityVolumeInfo::SerializeToDict(DictionaryValue *dict) const {
+ AccessibilityControlInfo::SerializeToDict(dict);
+ dict->SetDouble(keys::kVolumeKey, volume_);
+ dict->SetBoolean(keys::kIsVolumeMuteKey, is_mute_);
+}
+
AccessibilityMenuInfo::AccessibilityMenuInfo(Profile* profile,
const std::string& menu_name)
: AccessibilityControlInfo(profile, menu_name) {

Powered by Google App Engine
This is Rietveld 408576698