| 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 /** | 5 /** |
| 6 * FileManager constructor. | 6 * FileManager constructor. |
| 7 * | 7 * |
| 8 * FileManager objects encapsulate the functionality of the file selector | 8 * FileManager objects encapsulate the functionality of the file selector |
| 9 * dialogs, as well as the full screen file manager application (though the | 9 * dialogs, as well as the full screen file manager application (though the |
| 10 * latter is not yet implemented). | 10 * latter is not yet implemented). |
| (...skipping 467 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 478 assert(this.ui_.textContextMenu); | 478 assert(this.ui_.textContextMenu); |
| 479 | 479 |
| 480 this.commandHandler = new CommandHandler(this); | 480 this.commandHandler = new CommandHandler(this); |
| 481 | 481 |
| 482 // Kick the import enabled promise to be sure it is loaded | 482 // Kick the import enabled promise to be sure it is loaded |
| 483 // (and cached) for use by code that requires synchronous | 483 // (and cached) for use by code that requires synchronous |
| 484 // access (e.g. Commands). | 484 // access (e.g. Commands). |
| 485 importer.importEnabled().then( | 485 importer.importEnabled().then( |
| 486 function(enabled) { | 486 function(enabled) { |
| 487 if (enabled) { | 487 if (enabled) { |
| 488 var commandAdapter = new importer.ButtonCommandAdapter(this); |
| 488 this.importController_ = new importer.ImportController( | 489 this.importController_ = new importer.ImportController( |
| 489 new importer.RuntimeControllerEnvironment(this), | 490 new importer.RuntimeControllerEnvironment(this), |
| 490 /** @type {!importer.MediaScanner} */ ( | 491 /** @type {!importer.MediaScanner} */ ( |
| 491 this.mediaScanner_), | 492 this.mediaScanner_), |
| 492 /** @type {!importer.ImportRunner} */ ( | 493 /** @type {!importer.ImportRunner} */ ( |
| 493 this.mediaImportHandler_), | 494 this.mediaImportHandler_), |
| 494 this.commandHandler.updateAvailability.bind( | 495 commandAdapter.update.bind(commandAdapter)); |
| 495 this.commandHandler)); | |
| 496 } | 496 } |
| 497 }.bind(this)); | 497 }.bind(this)); |
| 498 | 498 |
| 499 // TODO(hirono): Move the following block to the UI part. | 499 // TODO(hirono): Move the following block to the UI part. |
| 500 var commandButtons = this.dialogDom_.querySelectorAll('button[command]'); | 500 var commandButtons = this.dialogDom_.querySelectorAll('button[command]'); |
| 501 for (var j = 0; j < commandButtons.length; j++) | 501 for (var j = 0; j < commandButtons.length; j++) |
| 502 CommandButton.decorate(commandButtons[j]); | 502 CommandButton.decorate(commandButtons[j]); |
| 503 | 503 |
| 504 var inputs = this.dialogDom_.querySelectorAll( | 504 var inputs = this.dialogDom_.querySelectorAll( |
| 505 'input[type=text], input[type=search], textarea'); | 505 'input[type=text], input[type=search], textarea'); |
| (...skipping 770 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1276 out += this.initializeQueue_.pendingTasks[key].toString() + '\n'; | 1276 out += this.initializeQueue_.pendingTasks[key].toString() + '\n'; |
| 1277 }.bind(this)); | 1277 }.bind(this)); |
| 1278 | 1278 |
| 1279 out += '2. VolumeManagerWrapper\n' + | 1279 out += '2. VolumeManagerWrapper\n' + |
| 1280 this.volumeManager_.toString() + '\n'; | 1280 this.volumeManager_.toString() + '\n'; |
| 1281 | 1281 |
| 1282 out += 'End of debug information.'; | 1282 out += 'End of debug information.'; |
| 1283 console.log(out); | 1283 console.log(out); |
| 1284 }; | 1284 }; |
| 1285 })(); | 1285 })(); |
| OLD | NEW |