| 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 // This variable is checked in SelectFileDialogExtensionBrowserTest. | 5 // This variable is checked in SelectFileDialogExtensionBrowserTest. |
| 6 var JSErrorCount = 0; | 6 var JSErrorCount = 0; |
| 7 | 7 |
| 8 /** | 8 /** |
| 9 * Count uncaught exceptions. | 9 * Count uncaught exceptions. |
| 10 */ | 10 */ |
| 11 window.onerror = function() { JSErrorCount++ }; | 11 window.onerror = function() { JSErrorCount++ }; |
| 12 | 12 |
| 13 /** | 13 /** |
| 14 * FileManager constructor. | 14 * FileManager constructor. |
| 15 * | 15 * |
| 16 * FileManager objects encapsulate the functionality of the file selector | 16 * FileManager objects encapsulate the functionality of the file selector |
| 17 * dialogs, as well as the full screen file manager application (though the | 17 * dialogs, as well as the full screen file manager application (though the |
| 18 * latter is not yet implemented). | 18 * latter is not yet implemented). |
| 19 * | 19 * |
| 20 * @constructor | |
| 21 * @param {HTMLElement} dialogDom The DOM node containing the prototypical | 20 * @param {HTMLElement} dialogDom The DOM node containing the prototypical |
| 22 * dialog UI. | 21 * dialog UI. |
| 22 * @constructor |
| 23 */ | 23 */ |
| 24 function FileManager(dialogDom) { | 24 function FileManager(dialogDom) { |
| 25 this.dialogDom_ = dialogDom; | 25 this.dialogDom_ = dialogDom; |
| 26 this.filesystem_ = null; | 26 this.filesystem_ = null; |
| 27 | 27 |
| 28 if (window.appState) { | 28 if (window.appState) { |
| 29 this.params_ = window.appState.params || {}; | 29 this.params_ = window.appState.params || {}; |
| 30 this.defaultPath = window.appState.defaultPath; | 30 this.defaultPath = window.appState.defaultPath; |
| 31 util.saveAppState(); | 31 util.saveAppState(); |
| 32 } else { | 32 } else { |
| (...skipping 2904 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2937 return this.directoryModel_.getFileList(); | 2937 return this.directoryModel_.getFileList(); |
| 2938 }; | 2938 }; |
| 2939 | 2939 |
| 2940 /** | 2940 /** |
| 2941 * @return {cr.ui.List} Current list object. | 2941 * @return {cr.ui.List} Current list object. |
| 2942 */ | 2942 */ |
| 2943 FileManager.prototype.getCurrentList = function() { | 2943 FileManager.prototype.getCurrentList = function() { |
| 2944 return this.currentList_; | 2944 return this.currentList_; |
| 2945 }; | 2945 }; |
| 2946 })(); | 2946 })(); |
| OLD | NEW |