| OLD | NEW |
| (Empty) | |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 /** |
| 6 * The container of the VolumeInfo for each mounted volume. |
| 7 * @interface |
| 8 */ |
| 9 function VolumeInfoList() {}; |
| 10 |
| 11 /** @type {number} */ |
| 12 VolumeInfoList.prototype.length; |
| 13 |
| 14 /** |
| 15 * Adds the event listener to listen the change of volume info. |
| 16 * @param {string} type The name of the event. |
| 17 * @param {function(Event)} handler The handler for the event. |
| 18 */ |
| 19 VolumeInfoList.prototype.addEventListener = function(type, handler) {}; |
| 20 |
| 21 /** |
| 22 * Removes the event listener. |
| 23 * @param {string} type The name of the event. |
| 24 * @param {function(Event)} handler The handler to be removed. |
| 25 */ |
| 26 VolumeInfoList.prototype.removeEventListener = function(type, handler) {}; |
| 27 |
| 28 /** |
| 29 * Adds the volumeInfo to the appropriate position. If there already exists, |
| 30 * just replaces it. |
| 31 * @param {VolumeInfo} volumeInfo The information of the new volume. |
| 32 */ |
| 33 VolumeInfoList.prototype.add = function(volumeInfo) {}; |
| 34 |
| 35 /** |
| 36 * Removes the VolumeInfo having the given ID. |
| 37 * @param {string} volumeId ID of the volume. |
| 38 */ |
| 39 VolumeInfoList.prototype.remove = function(volumeId) {}; |
| 40 |
| 41 /** |
| 42 * Obtains an index from the volume ID. |
| 43 * @param {string} volumeId Volume ID. |
| 44 * @return {number} Index of the volume. |
| 45 */ |
| 46 VolumeInfoList.prototype.findIndex = function(volumeId) {}; |
| 47 |
| 48 /** |
| 49 * Searches the information of the volume that contains the passed entry. |
| 50 * @param {!Entry|!FakeEntry} entry Entry on the volume to be found. |
| 51 * @return {VolumeInfo} The volume's information, or null if not found. |
| 52 */ |
| 53 VolumeInfoList.prototype.findByEntry = function(entry) {}; |
| 54 |
| 55 /** |
| 56 * Searches the information of the volume that exists on the given device path. |
| 57 * @param {string} devicePath Path of the device to search. |
| 58 * @return {VolumeInfo} The volume's information, or null if not found. |
| 59 */ |
| 60 VolumeInfoList.prototype.findByDevicePath = function(devicePath) {}; |
| 61 |
| 62 /** |
| 63 * Returns a promise that will be resolved when volume info, identified |
| 64 * by {@code volumeId} is created. |
| 65 * |
| 66 * @param {string} volumeId |
| 67 * @return {!Promise.<!VolumeInfo>} The VolumeInfo. Will not resolve |
| 68 * if the volume is never mounted. |
| 69 */ |
| 70 VolumeInfoList.prototype.whenVolumeInfoReady = function(volumeId) {}; |
| 71 |
| 72 /** |
| 73 * @param {number} index The index of the volume in the list. |
| 74 * @return {!VolumeInfo} The VolumeInfo instance. |
| 75 */ |
| 76 VolumeInfoList.prototype.item = function(index) {}; |
| OLD | NEW |