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); | |
489 this.importController_ = new importer.ImportController( | 488 this.importController_ = new importer.ImportController( |
490 new importer.RuntimeControllerEnvironment(this), | 489 new importer.RuntimeControllerEnvironment(this), |
491 /** @type {!importer.MediaScanner} */ ( | 490 /** @type {!importer.MediaScanner} */ ( |
492 this.mediaScanner_), | 491 this.mediaScanner_), |
493 /** @type {!importer.ImportRunner} */ ( | 492 /** @type {!importer.ImportRunner} */ ( |
494 this.mediaImportHandler_), | 493 this.mediaImportHandler_), |
495 commandAdapter.update.bind(commandAdapter)); | 494 new importer.RuntimeCommandWidget()); |
496 } | 495 } |
497 }.bind(this)); | 496 }.bind(this)); |
498 | 497 |
499 // TODO(hirono): Move the following block to the UI part. | 498 // TODO(hirono): Move the following block to the UI part. |
500 var commandButtons = this.dialogDom_.querySelectorAll('button[command]'); | 499 var commandButtons = this.dialogDom_.querySelectorAll('button[command]'); |
501 for (var j = 0; j < commandButtons.length; j++) | 500 for (var j = 0; j < commandButtons.length; j++) |
502 CommandButton.decorate(commandButtons[j]); | 501 CommandButton.decorate(commandButtons[j]); |
503 | 502 |
504 var inputs = this.dialogDom_.querySelectorAll( | 503 var inputs = this.dialogDom_.querySelectorAll( |
505 'input[type=text], input[type=search], textarea'); | 504 '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'; | 1275 out += this.initializeQueue_.pendingTasks[key].toString() + '\n'; |
1277 }.bind(this)); | 1276 }.bind(this)); |
1278 | 1277 |
1279 out += '2. VolumeManagerWrapper\n' + | 1278 out += '2. VolumeManagerWrapper\n' + |
1280 this.volumeManager_.toString() + '\n'; | 1279 this.volumeManager_.toString() + '\n'; |
1281 | 1280 |
1282 out += 'End of debug information.'; | 1281 out += 'End of debug information.'; |
1283 console.log(out); | 1282 console.log(out); |
1284 }; | 1283 }; |
1285 })(); | 1284 })(); |
OLD | NEW |