Index: ui/file_manager/audio_player/elements/track_list.js |
diff --git a/ui/file_manager/audio_player/elements/track_list.js b/ui/file_manager/audio_player/elements/track_list.js |
index d1a030e4652d785364e0e65fbcaf147161580a52..e04b727b8fba411b466e7e3fa531ee0c75e70735 100644 |
--- a/ui/file_manager/audio_player/elements/track_list.js |
+++ b/ui/file_manager/audio_player/elements/track_list.js |
@@ -56,26 +56,9 @@ var TrackInfo; |
* element is ready. |
*/ |
ready: function() { |
- this.observeTrackList(); |
- |
window.addEventListener('resize', this.onWindowResize_.bind(this)); |
}, |
- observeTrackList: function() { |
- // Unobserve the previous track list. |
- if (this.unobserveTrackList_) |
- this.unobserveTrackList_(); |
- |
- // Observe the new track list. |
- var observer = this.tracksValueChanged_.bind(this); |
- Array.observe(this.tracks, observer); |
- |
- // Set the function to unobserve it. |
- this.unobserveTrackList_ = function(tracks, observer) { |
- Array.unobserve(tracks, observer); |
- }.bind(null, this.tracks, observer); |
- }, |
- |
/** |
* Play order of the tracks. Each value is the index of 'this.tracks'. |
* @type {Array<number>} |
@@ -130,9 +113,6 @@ var TrackInfo; |
// Note: Sometimes both oldValue and newValue are null though the actual |
// values are not null. Maybe it's a bug of Polymer. |
- // Re-register the observer of 'this.tracks'. |
- this.observeTrackList(); |
- |
if (this.tracks.length !== 0) { |
// Restore the active track. |
if (this.currentTrackIndex !== -1 && |
@@ -149,17 +129,6 @@ var TrackInfo; |
}, |
/** |
- * Invoked when the value in the 'tracks' is changed. |
- * @param {Array<Object>} changes The detail of the change. |
- */ |
- tracksValueChanged_: function(changes) { |
- if (this.tracks.length === 0) |
- this.currentTrackIndex = -1; |
- else |
- this.set('tracks.' + this.currentTrackIndex + '.active', true); |
- }, |
- |
- /** |
* Invoked when the track element is clicked. |
* @param {Event} event Click event. |
*/ |