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

Unified Diff: ui/file_manager/audio_player/elements/control_panel.js

Issue 1441603002: Revert of Fix accessibility issues in AudioPlayer and VideoPlayer. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 1 month 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: ui/file_manager/audio_player/elements/control_panel.js
diff --git a/ui/file_manager/audio_player/elements/control_panel.js b/ui/file_manager/audio_player/elements/control_panel.js
index d67253c16b9ae6607e3c79aa7de028add0337a0b..89562878932e291d1dcad25ac2b8ebd98db8d363 100644
--- a/ui/file_manager/audio_player/elements/control_panel.js
+++ b/ui/file_manager/audio_player/elements/control_panel.js
@@ -16,9 +16,7 @@
playing: {
type: Boolean,
value: false,
- notify: true,
- reflectToAttribute: true,
- observer: 'playingChanged_'
+ notify: true
},
/**
@@ -90,14 +88,6 @@
type: Boolean,
value: false,
notify: true
- },
-
- /**
- * Dictionary which contains aria-labels for each controls.
- */
- ariaLabels: {
- type: Object,
- observer: 'ariaLabelsChanged_'
}
},
@@ -157,35 +147,19 @@
},
/**
- * Invoked when the playing property is changed.
- * @param {boolean} playing
- * @private
+ * Computes state for play button based on 'playing' property.
+ * @return {string}
*/
- playingChanged_: function(playing) {
- if (this.ariaLabels) {
- this.$.play.setAttribute('aria-label',
- playing ? this.ariaLabels.pause : this.ariaLabels.play);
- }
+ computePlayState_: function(playing) {
+ return playing ? "playing" : "ended";
},
/**
- * Invoked when the ariaLabels property is changed.
- * @param {Object} ariaLabels
- * @private
+ * Computes style for '.filled' element of progress bar.
+ * @return {string}
*/
- ariaLabelsChanged_: function(ariaLabels) {
- assert(ariaLabels);
- // TODO(fukino): Use data bindings.
- this.$.volumeSlider.setAttribute('aria-label', ariaLabels.volumeSlider);
- this.$.shuffle.setAttribute('aria-label', ariaLabels.shuffle);
- this.$.repeat.setAttribute('aria-label', ariaLabels.repeat);
- this.$.previous.setAttribute('aria-label', ariaLabels.previous);
- this.$.play.setAttribute('aria-label',
- this.playing ? ariaLabels.pause : ariaLabels.play);
- this.$.next.setAttribute('aria-label', ariaLabels.next);
- this.$.volume.setAttribute('aria-label', ariaLabels.volume);
- this.$.playList.setAttribute('aria-label', ariaLabels.playList);
- this.$.timeSlider.setAttribute('aria-label', ariaLabels.seekSlider);
+ computeProgressBarStyle_: function(time, duration) {
+ return 'width: ' + (time / duration * 100) + '%;';
}
});
})(); // Anonymous closure
« no previous file with comments | « ui/file_manager/audio_player/elements/control_panel.html ('k') | ui/file_manager/audio_player/js/audio_player.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698