| Index: ui/file_manager/file_manager/background/js/entry_location_impl.js
|
| diff --git a/ui/file_manager/file_manager/background/js/entry_location_impl.js b/ui/file_manager/file_manager/background/js/entry_location_impl.js
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..34713d9ff6265000e6bebb34e51d5b37e80cb2af
|
| --- /dev/null
|
| +++ b/ui/file_manager/file_manager/background/js/entry_location_impl.js
|
| @@ -0,0 +1,44 @@
|
| +// Copyright 2016 The Chromium Authors. All rights reserved.
|
| +// Use of this source code is governed by a BSD-style license that can be
|
| +// found in the LICENSE file.
|
| +
|
| +/**
|
| + * Location information which shows where the path points in FileManager's
|
| + * file system.
|
| + *
|
| + * @param {!VolumeInfo} volumeInfo Volume information.
|
| + * @param {VolumeManagerCommon.RootType} rootType Root type.
|
| + * @param {boolean} isRootEntry Whether the entry is root entry or not.
|
| + * @param {boolean} isReadOnly Whether the entry is read only or not.
|
| + * @constructor
|
| + * @implements {EntryLocation}
|
| + */
|
| +function EntryLocationImpl(volumeInfo, rootType, isRootEntry, isReadOnly) {
|
| + /** @override */
|
| + this.volumeInfo = volumeInfo;
|
| +
|
| + /** @override */
|
| + this.rootType = rootType;
|
| +
|
| + /** @override */
|
| + this.isRootEntry = isRootEntry;
|
| +
|
| + /** @override */
|
| + this.isSpecialSearchRoot =
|
| + this.rootType === VolumeManagerCommon.RootType.DRIVE_OFFLINE ||
|
| + this.rootType === VolumeManagerCommon.RootType.DRIVE_SHARED_WITH_ME ||
|
| + this.rootType === VolumeManagerCommon.RootType.DRIVE_RECENT;
|
| +
|
| + /** @override */
|
| + this.isDriveBased =
|
| + this.rootType === VolumeManagerCommon.RootType.DRIVE ||
|
| + this.rootType === VolumeManagerCommon.RootType.DRIVE_OTHER ||
|
| + this.rootType === VolumeManagerCommon.RootType.DRIVE_SHARED_WITH_ME ||
|
| + this.rootType === VolumeManagerCommon.RootType.DRIVE_RECENT ||
|
| + this.rootType === VolumeManagerCommon.RootType.DRIVE_OFFLINE;
|
| +
|
| + /** @override */
|
| + this.isReadOnly = isReadOnly;
|
| +
|
| + Object.freeze(this);
|
| +}
|
|
|