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

Side by Side Diff: chrome/browser/resources/file_manager/js/media/audio_player.js

Issue 11269043: Make the title of Chrome OS Audio Player empty (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Added a test Created 8 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « chrome/browser/chromeos/media/media_player_extension_api.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 document.addEventListener('DOMContentLoaded', function() { 5 document.addEventListener('DOMContentLoaded', function() {
6 // Test harness sets the search string to prevent the automatic load. 6 // Test harness sets the search string to prevent the automatic load.
7 // It calls AudioPlayer.load() explicitly after initializing 7 // It calls AudioPlayer.load() explicitly after initializing
8 // the |chrome| variable with an appropriate mock object. 8 // the |chrome| variable with an appropriate mock object.
9 if (!document.location.search) { 9 if (!document.location.search) {
10 AudioPlayer.load(); 10 AudioPlayer.load();
(...skipping 369 matching lines...) Expand 10 before | Expand all | Expand 10 after
380 380
381 /** 381 /**
382 * Set the correct player window height. 382 * Set the correct player window height.
383 * @private 383 * @private
384 */ 384 */
385 AudioPlayer.prototype.syncHeight_ = function() { 385 AudioPlayer.prototype.syncHeight_ = function() {
386 var expandedListHeight = 386 var expandedListHeight =
387 Math.min(this.urls_.length, 3) * AudioPlayer.TRACK_HEIGHT; 387 Math.min(this.urls_.length, 3) * AudioPlayer.TRACK_HEIGHT;
388 this.trackList_.style.height = expandedListHeight + 'px'; 388 this.trackList_.style.height = expandedListHeight + 'px';
389 389
390 var targetClientHeight = AudioPlayer.CONTROLS_HEIGHT +
391 (this.isCompact_() ?
392 AudioPlayer.TRACK_HEIGHT :
393 AudioPlayer.HEADER_HEIGHT + expandedListHeight);
394
390 chrome.mediaPlayerPrivate.setWindowHeight( 395 chrome.mediaPlayerPrivate.setWindowHeight(
391 (this.isCompact_() ? 396 targetClientHeight - this.container_.clientHeight);
392 AudioPlayer.TRACK_HEIGHT :
393 AudioPlayer.HEADER_HEIGHT + expandedListHeight) +
394 AudioPlayer.CONTROLS_HEIGHT);
395 }; 397 };
396 398
397 399
398 /** 400 /**
399 * Create a TrackInfo object encapsulating the information about one track. 401 * Create a TrackInfo object encapsulating the information about one track.
400 * 402 *
401 * @param {HTMLElement} container Container element. 403 * @param {HTMLElement} container Container element.
402 * @param {string} url Track url. 404 * @param {string} url Track url.
403 * @param {function} onClick Click handler. 405 * @param {function} onClick Click handler.
404 * @constructor 406 * @constructor
(...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after
538 * Restore the Save the play state from the location hash. 540 * Restore the Save the play state from the location hash.
539 */ 541 */
540 FullWindowAudioControls.prototype.restorePlayState = function() { 542 FullWindowAudioControls.prototype.restorePlayState = function() {
541 if (this.restoreWhenLoaded_) { 543 if (this.restoreWhenLoaded_) {
542 this.restoreWhenLoaded_ = false; // This should only work once. 544 this.restoreWhenLoaded_ = false; // This should only work once.
543 if (this.decodeStateFromLocation()) 545 if (this.decodeStateFromLocation())
544 return; 546 return;
545 } 547 }
546 this.play(); 548 this.play();
547 }; 549 };
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/media/media_player_extension_api.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698