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

Side by Side Diff: ui/file_manager/audio_player/elements/audio_player.js

Issue 984593002: Use Object.observe() instead of Polyfills (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 5 years, 9 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 unified diff | Download patch
« no previous file with comments | « no previous file | ui/file_manager/audio_player/elements/track_list.js » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 Polymer('audio-player', { 5 Polymer('audio-player', {
6 /** 6 /**
7 * Child Elements 7 * Child Elements
8 */ 8 */
9 audioController: null, 9 audioController: null,
10 audioElement: null, 10 audioElement: null,
(...skipping 221 matching lines...) Expand 10 before | Expand all | Expand 10 after
232 232
233 // If there is only a single file in the list, 'currentTrackInde' is not 233 // If there is only a single file in the list, 'currentTrackInde' is not
234 // changed and the handler is not invoked. Instead, plays here. 234 // changed and the handler is not invoked. Instead, plays here.
235 // TODO(yoshiki): clean up the code around here. 235 // TODO(yoshiki): clean up the code around here.
236 if (isNextTrackAvailable && 236 if (isNextTrackAvailable &&
237 this.trackList.currentTrackIndex == nextTrackIndex) { 237 this.trackList.currentTrackIndex == nextTrackIndex) {
238 this.audioElement.play(); 238 this.audioElement.play();
239 } 239 }
240 240
241 this.trackList.currentTrackIndex = nextTrackIndex; 241 this.trackList.currentTrackIndex = nextTrackIndex;
242
243 Platform.performMicrotaskCheckpoint();
244 }, 242 },
245 243
246 /** 244 /**
247 * Timeout ID of auto advance. Used internally in scheduleAutoAdvance_() and 245 * Timeout ID of auto advance. Used internally in scheduleAutoAdvance_() and
248 * cancelAutoAdvance_(). 246 * cancelAutoAdvance_().
249 * @type {number} 247 * @type {number}
250 * @private 248 * @private
251 */ 249 */
252 autoAdvanceTimer_: null, 250 autoAdvanceTimer_: null,
253 251
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after
371 break; 369 break;
372 case 'MediaPreviousTrack': 370 case 'MediaPreviousTrack':
373 this.onControllerPreviousClicked(); 371 this.onControllerPreviousClicked();
374 break; 372 break;
375 case 'MediaStop': 373 case 'MediaStop':
376 // TODO: Define "Stop" behavior. 374 // TODO: Define "Stop" behavior.
377 break; 375 break;
378 } 376 }
379 }, 377 },
380 }); 378 });
OLDNEW
« no previous file with comments | « no previous file | ui/file_manager/audio_player/elements/track_list.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698