Index: chrome/browser/resources/chromeos/chromevox/chromevox/background/options.js |
diff --git a/chrome/browser/resources/chromeos/chromevox/chromevox/background/options.js b/chrome/browser/resources/chromeos/chromevox/chromevox/background/options.js |
index 1d563c86a74bfb0d8aac6ce39e8a87a6aac00158..1d6fbc05bca40b5bdbc8d24e26ee0060dd55be36 100644 |
--- a/chrome/browser/resources/chromeos/chromevox/chromevox/background/options.js |
+++ b/chrome/browser/resources/chromeos/chromevox/chromevox/background/options.js |
@@ -71,6 +71,20 @@ cvox.OptionsPage.init = function() { |
localStorage['brailleSideBySide'] === 'true' ? |
currentlyDisplayingSideBySide : currentlyDisplayingInterleave; |
+ chrome.commandLinePrivate.hasSwitch('enable-default-media-session', |
+ function(result) { |
+ if (!result) { |
+ $('audioStrategy').hidden = true; |
+ $('audioDescription').hidden = true; |
+ } |
+ if (localStorage['audioStrategy']) { |
+ for (var i = 0, opt; opt = $('audioStrategy').options[i]; i++) { |
+ if (opt.id == localStorage['audioStrategy']) { |
+ opt.setAttribute('selected', ''); |
+ } |
+ } |
+ } |
+ }); |
Msgs.addTranslatedMessagesToDom(document); |
cvox.OptionsPage.hidePlatformSpecifics(); |
@@ -328,6 +342,11 @@ cvox.OptionsPage.eventListener = function(event) { |
cvox.OptionsPage.prefs.setPref(target.name, elements[i].value); |
} |
} |
+ } else if (target.tagName == 'SELECT') { |
+ var selIndex = target.selectedIndex; |
+ var sel = target.options[selIndex]; |
+ var value = sel ? sel.id : 'audioNormal'; |
+ cvox.OptionsPage.prefs.setPref(target.id, value); |
} |
} |
}, 0); |