Index: chrome/browser/resources/chromeos/chromevox/host/interface/abstract_earcons.js |
diff --git a/chrome/browser/resources/chromeos/chromevox/host/interface/abstract_earcons.js b/chrome/browser/resources/chromeos/chromevox/host/interface/abstract_earcons.js |
index 1dabd1ad6d461aea3f81f0a732af57caf8869229..0f334fc9e43508d08521d251644b9ea341cfd32e 100644 |
--- a/chrome/browser/resources/chromeos/chromevox/host/interface/abstract_earcons.js |
+++ b/chrome/browser/resources/chromeos/chromevox/host/interface/abstract_earcons.js |
@@ -37,10 +37,12 @@ cvox.Earcon = { |
OBJECT_SELECT: 'object_select', |
PAGE_FINISH_LOADING: 'page_finish_loading', |
PAGE_START_LOADING: 'page_start_loading', |
+ POP_UP_BUTTON: 'pop_up_button', |
RECOVER_FOCUS: 'recover_focus', |
SELECTION: 'selection', |
SELECTION_REVERSE: 'selection_reverse', |
SKIP: 'skip', |
+ SLIDER: 'slider', |
WRAP: 'wrap', |
WRAP_EDGE: 'wrap_edge', |
}; |
@@ -50,16 +52,21 @@ cvox.Earcon = { |
* @constructor |
*/ |
cvox.AbstractEarcons = function() { |
- /** |
- * Public flag set to enable or disable earcons. Callers should prefer |
- * toggle(); however, this member is public for initialization. |
- * @type {boolean} |
- */ |
- this.enabled = true; |
+ if (localStorage['earcons'] === 'false') { |
Peter Lundblad
2015/10/14 12:27:26
If we're running in the content script, what local
dmazzoni
2015/10/14 16:13:28
It appears to be shared.
To be safe I moved this
|
+ cvox.AbstractEarcons.enabled = false; |
+ } |
}; |
/** |
+ * Public static flag set to enable or disable earcons. Callers should prefer |
+ * toggle(); however, this member is public for initialization. |
+ * @type {boolean} |
+ */ |
+cvox.AbstractEarcons.enabled = true; |
+ |
+ |
+/** |
* Plays the specified earcon sound. |
* @param {cvox.Earcon} earcon An earcon identifier. |
*/ |
@@ -81,6 +88,6 @@ cvox.AbstractEarcons.prototype.earconsAvailable = function() { |
* @return {boolean} True if earcons are now enabled; false otherwise. |
*/ |
cvox.AbstractEarcons.prototype.toggle = function() { |
Peter Lundblad
2015/10/14 12:27:26
I find it slightly unexpected to have an instance
dmazzoni
2015/10/14 16:13:28
The content script extends it, though - it sends t
|
- this.enabled = !this.enabled; |
- return this.enabled; |
+ cvox.AbstractEarcons.enabled = !cvox.AbstractEarcons.enabled; |
+ return cvox.AbstractEarcons.enabled; |
}; |