| OLD | NEW |
| 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 'use strict'; | 5 'use strict'; |
| 6 | 6 |
| 7 /** | 7 /** |
| 8 * Number of runtime errors catched in the background page. | 8 * Number of runtime errors catched in the background page. |
| 9 * @type {number} | 9 * @type {number} |
| 10 */ | 10 */ |
| (...skipping 335 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 346 */ | 346 */ |
| 347 var FILE_MANAGER_WINDOW_CREATE_OPTIONS = Object.freeze({ | 347 var FILE_MANAGER_WINDOW_CREATE_OPTIONS = Object.freeze({ |
| 348 defaultLeft: Math.round(window.screen.availWidth * 0.1), | 348 defaultLeft: Math.round(window.screen.availWidth * 0.1), |
| 349 defaultTop: Math.round(window.screen.availHeight * 0.1), | 349 defaultTop: Math.round(window.screen.availHeight * 0.1), |
| 350 defaultWidth: Math.round(window.screen.availWidth * 0.8), | 350 defaultWidth: Math.round(window.screen.availWidth * 0.8), |
| 351 defaultHeight: Math.round(window.screen.availHeight * 0.8), | 351 defaultHeight: Math.round(window.screen.availHeight * 0.8), |
| 352 minWidth: 320, | 352 minWidth: 320, |
| 353 minHeight: 240, | 353 minHeight: 240, |
| 354 frame: 'none', | 354 frame: 'none', |
| 355 hidden: true, | 355 hidden: true, |
| 356 transparentBackground: true, | 356 transparentBackground: true |
| 357 singleton: false | |
| 358 }); | 357 }); |
| 359 | 358 |
| 360 /** | 359 /** |
| 361 * @param {Object=} opt_appState App state. | 360 * @param {Object=} opt_appState App state. |
| 362 * @param {number=} opt_id Window id. | 361 * @param {number=} opt_id Window id. |
| 363 * @param {LaunchType=} opt_type Launch type. Default: ALWAYS_CREATE. | 362 * @param {LaunchType=} opt_type Launch type. Default: ALWAYS_CREATE. |
| 364 * @param {function(string)=} opt_callback Completion callback with the App ID. | 363 * @param {function(string)=} opt_callback Completion callback with the App ID. |
| 365 */ | 364 */ |
| 366 function launchFileManager(opt_appState, opt_id, opt_type, opt_callback) { | 365 function launchFileManager(opt_appState, opt_id, opt_type, opt_callback) { |
| 367 var type = opt_type || LaunchType.ALWAYS_CREATE; | 366 var type = opt_type || LaunchType.ALWAYS_CREATE; |
| (...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 508 * Audio player window create options. | 507 * Audio player window create options. |
| 509 * @type {Object} | 508 * @type {Object} |
| 510 * @const | 509 * @const |
| 511 */ | 510 */ |
| 512 var AUDIO_PLAYER_CREATE_OPTIONS = Object.freeze({ | 511 var AUDIO_PLAYER_CREATE_OPTIONS = Object.freeze({ |
| 513 type: 'panel', | 512 type: 'panel', |
| 514 hidden: true, | 513 hidden: true, |
| 515 minHeight: 35 + 58, | 514 minHeight: 35 + 58, |
| 516 minWidth: 280, | 515 minWidth: 280, |
| 517 height: 35 + 58, | 516 height: 35 + 58, |
| 518 width: 280, | 517 width: 280 |
| 519 singleton: false | |
| 520 }); | 518 }); |
| 521 | 519 |
| 522 var audioPlayer = new SingletonAppWindowWrapper('mediaplayer.html', | 520 var audioPlayer = new SingletonAppWindowWrapper('mediaplayer.html', |
| 523 AUDIO_PLAYER_CREATE_OPTIONS); | 521 AUDIO_PLAYER_CREATE_OPTIONS); |
| 524 | 522 |
| 525 /** | 523 /** |
| 526 * Launch the audio player. | 524 * Launch the audio player. |
| 527 * @param {Object} playlist Playlist. | 525 * @param {Object} playlist Playlist. |
| 528 */ | 526 */ |
| 529 function launchAudioPlayer(playlist) { | 527 function launchAudioPlayer(playlist) { |
| (...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 653 contexts: ['launcher'], | 651 contexts: ['launcher'], |
| 654 title: str('NEW_WINDOW_BUTTON_LABEL') | 652 title: str('NEW_WINDOW_BUTTON_LABEL') |
| 655 }); | 653 }); |
| 656 }; | 654 }; |
| 657 | 655 |
| 658 /** | 656 /** |
| 659 * Singleton instance of Background. | 657 * Singleton instance of Background. |
| 660 * @type {Background} | 658 * @type {Background} |
| 661 */ | 659 */ |
| 662 window.background = new Background(); | 660 window.background = new Background(); |
| OLD | NEW |