function ShortcutItem(modelItem, tree) {
  var item = /** @type {ShortcutItem} */ (new cr.ui.TreeItem());
  // Get the original label id defined by TreeItem, before overwriting
  // prototype.
  var labelId = item.labelElement.id;
  item.__proto__ = ShortcutItem.prototype;

  item.parentTree_ = tree;
  item.dirEntry_ = modelItem.entry;
  item.modelItem_ = modelItem;

  item.innerHTML = TREE_ITEM_INNER_HTML;
  item.labelElement.id = labelId;

  var icon = item.querySelector('.icon');
  icon.classList.add('item-icon');
  icon.setAttribute('volume-type-icon', VolumeManagerCommon.VolumeType.DRIVE);

  if (tree.contextMenuForRootItems)
    item.setContextMenu_(tree.contextMenuForRootItems);

  item.label = modelItem.entry.name;
  return item;
}
/**
 * A TreeItem which represents a shortcut for Drive folder.
 * Shortcut items are displayed as top-level children of DirectoryTree.
 *
 * @param {!NavigationModelShortcutItem} modelItem NavigationModelItem of this
 *     volume.
 * @param {!DirectoryTree} tree Current tree, which contains this item.
 * @extends {cr.ui.TreeItem}
 * @constructor
 */
A TreeItem which represents a shortcut for Drive folder.
Shortcut items are displayed as top-level children of DirectoryTree.

@param {!NavigationModelShortcutItem} modelItem NavigationModelItem of this
volume.
@param {!DirectoryTree} tree Current tree, which contains this item.
A TreeItem which represents a shortcut for Drive folder . Shortcut items are displayed as top - level children of DirectoryTree . @param { !NavigationModelShortcutItem } modelItem NavigationModelItem of this volume . @param { !DirectoryTree } tree Current tree which contains this item .
function ShortcutItem(modelItem, tree) {
  var item =  (new cr.ui.TreeItem());
  var labelId = item.labelElement.id;
  item.__proto__ = ShortcutItem.prototype;
  item.parentTree_ = tree;
  item.dirEntry_ = modelItem.entry;
  item.modelItem_ = modelItem;
  item.innerHTML = TREE_ITEM_INNER_HTML;
  item.labelElement.id = labelId;
  var icon = item.querySelector('.icon');
  icon.classList.add('item-icon');
  icon.setAttribute('volume-type-icon', VolumeManagerCommon.VolumeType.DRIVE);
  if (tree.contextMenuForRootItems)
    item.setContextMenu_(tree.contextMenuForRootItems);
  item.label = modelItem.entry.name;
  return item;
}
function ShortcutItem ( modelItem , tree ) { var item = ( new cr . ui . TreeItem ( ) ) ; var labelId = item . labelElement . id ; item . __proto__ = ShortcutItem . prototype ; item . parentTree_ = tree ; item . dirEntry_ = modelItem . entry ; item . modelItem_ = modelItem ; item . innerHTML = TREE_ITEM_INNER_HTML ; item . labelElement . id = labelId ; var icon = item . querySelector ( '.icon' ) ; icon . classList . add ( 'item-icon' ) ; icon . setAttribute ( 'volume-type-icon' , VolumeManagerCommon . VolumeType . DRIVE ) ; if ( tree . contextMenuForRootItems ) item . setContextMenu_ ( tree . contextMenuForRootItems ) ; item . label = modelItem . entry . name ; return item ; }
A TreeItem which represents a shortcut for Drive folder.
A TreeItem which represents a shortcut for Drive folder .
/** @type {ShortcutItem} */ // Get the original label id defined by TreeItem, before overwriting // prototype.