Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(834)

Side by Side Diff: chrome/common/extensions/api/file_manager_private.idl

Issue 2297043002: Web expose FileSystemFileEntry, FileSystemDirectoryEntry and friends (Closed)
Patch Set: Rebased Created 4 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 // fileManagerPrivate API. 5 // fileManagerPrivate API.
6 // This is a private API used by the file browser of ChromeOS. 6 // This is a private API used by the file browser of ChromeOS.
7 [platforms=("chromeos"), 7 [platforms=("chromeos"),
8 implemented_in="chrome/browser/chromeos/extensions/file_manager/file_manager_pr ivate_api_functions.h"] 8 implemented_in="chrome/browser/chromeos/extensions/file_manager/file_manager_pr ivate_api_functions.h"]
9 namespace fileManagerPrivate { 9 namespace fileManagerPrivate {
10 // Type of the mounted volume. 10 // Type of the mounted volume.
(...skipping 441 matching lines...) Expand 10 before | Expand all | Expand 10 after
452 dictionary FileWatchEvent { 452 dictionary FileWatchEvent {
453 // Specifies type of event that is raised. 453 // Specifies type of event that is raised.
454 FileWatchEventType eventType; 454 FileWatchEventType eventType;
455 455
456 // An Entry object which represents a changed directory. The conversion into a 456 // An Entry object which represents a changed directory. The conversion into a
457 // kind of FileEntry object is done in 457 // kind of FileEntry object is done in
458 // file_browser_handler_custom_bindings.cc. For filesystem API's Entry 458 // file_browser_handler_custom_bindings.cc. For filesystem API's Entry
459 // interface, see <a 459 // interface, see <a
460 // href='http://www.w3.org/TR/file-system-api/#the-entry-interface'>The Entry 460 // href='http://www.w3.org/TR/file-system-api/#the-entry-interface'>The Entry
461 // interface</a>. 461 // interface</a>.
462 [instanceOf=Entry] object entry; 462 [instanceOf=FileSystemEntry] object entry;
463 463
464 // Detailed change information of change. It would be null if the detailed 464 // Detailed change information of change. It would be null if the detailed
465 // information is not available. 465 // information is not available.
466 FileChange[]? changedFiles; 466 FileChange[]? changedFiles;
467 }; 467 };
468 468
469 dictionary Preferences { 469 dictionary Preferences {
470 boolean driveEnabled; 470 boolean driveEnabled;
471 boolean cellularDisabled; 471 boolean cellularDisabled;
472 boolean hostedFilesDisabled; 472 boolean hostedFilesDisabled;
(...skipping 30 matching lines...) Expand all
503 }; 503 };
504 504
505 // Entry and Drive-related properties representing a search result. 505 // Entry and Drive-related properties representing a search result.
506 dictionary SearchResult { 506 dictionary SearchResult {
507 // A dictionary object which represents a Drive file. This will be converted 507 // A dictionary object which represents a Drive file. This will be converted
508 // into a kind of FileEntry object. See 508 // into a kind of FileEntry object. See
509 // file_browser_handler_custom_bindings.cc for details. For filesystem API's 509 // file_browser_handler_custom_bindings.cc for details. For filesystem API's
510 // Entry interface, see <a 510 // Entry interface, see <a
511 // href='http://www.w3.org/TR/file-system-api/#the-entry-interface'>The Entry 511 // href='http://www.w3.org/TR/file-system-api/#the-entry-interface'>The Entry
512 // interface</a>. 512 // interface</a>.
513 [instanceOf=Entry] object entry; 513 [instanceOf=FileSystemEntry] object entry;
514 514
515 // The base name of a Drive file that matched the search query. The matched 515 // The base name of a Drive file that matched the search query. The matched
516 // sub strings are highlighted with <b> element. Meta characters are escaped 516 // sub strings are highlighted with <b> element. Meta characters are escaped
517 // like &lt;. 517 // like &lt;.
518 DOMString highlightedBaseName; 518 DOMString highlightedBaseName;
519 }; 519 };
520 520
521 dictionary DriveConnectionState { 521 dictionary DriveConnectionState {
522 DOMString type; 522 DOMString type;
523 523
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after
607 // not be determined. 607 // not be determined.
608 callback GetSizeStatsCallback = void(optional MountPointSizeStats sizeStats); 608 callback GetSizeStatsCallback = void(optional MountPointSizeStats sizeStats);
609 609
610 callback GetPreferencesCallback = void(Preferences result); 610 callback GetPreferencesCallback = void(Preferences result);
611 611
612 // |entries| 612 // |entries|
613 // |nextFeed| ID of the feed that contains next chunk of the search result. 613 // |nextFeed| ID of the feed that contains next chunk of the search result.
614 // Should be sent to the next searchDrive request to perform 614 // Should be sent to the next searchDrive request to perform
615 // incremental search. 615 // incremental search.
616 callback SearchDriveCallback = 616 callback SearchDriveCallback =
617 void([instanceOf=Entry] object[] entries, DOMString nextFeed); 617 void([instanceOf=FileSystemEntry] object[] entries, DOMString nextFeed);
618 618
619 callback SearchDriveMetadataCallback = void(SearchResult[] results); 619 callback SearchDriveMetadataCallback = void(SearchResult[] results);
620 620
621 // |urls| The map of hash and array of FileEntry's URL. The array can be empty 621 // |urls| The map of hash and array of FileEntry's URL. The array can be empty
622 // if the corresponding file is not found. 622 // if the corresponding file is not found.
623 callback SearchFilesByHashesCallback = void(object urls); 623 callback SearchFilesByHashesCallback = void(object urls);
624 624
625 callback ZipSelectionCallback = void(optional boolean success); 625 callback ZipSelectionCallback = void(optional boolean success);
626 626
627 callback GetDriveConnectionStateCallback = void(DriveConnectionState result); 627 callback GetDriveConnectionStateCallback = void(DriveConnectionState result);
(...skipping 12 matching lines...) Expand all
640 640
641 // |profiles| List of profile information. 641 // |profiles| List of profile information.
642 // |runningProfile| ID of the profile that runs the application instance. 642 // |runningProfile| ID of the profile that runs the application instance.
643 // |showingProfile| ID of the profile that shows the application window. 643 // |showingProfile| ID of the profile that shows the application window.
644 callback GetProfilesCallback = void(ProfileInfo[] profiles, 644 callback GetProfilesCallback = void(ProfileInfo[] profiles,
645 DOMString runningProfile, 645 DOMString runningProfile,
646 DOMString displayProfile); 646 DOMString displayProfile);
647 647
648 // |entries| External entries. 648 // |entries| External entries.
649 callback ResolveEntriesCallback = 649 callback ResolveEntriesCallback =
650 void([instanceOf=Entry] object[] entries); 650 void([instanceOf=FileSystemEntry] object[] entries);
651 651
652 // |checksum| Result checksum. 652 // |checksum| Result checksum.
653 callback ComputeChecksumCallback = void(DOMString checksum); 653 callback ComputeChecksumCallback = void(DOMString checksum);
654 654
655 // |extensions| List of providing extensions. 655 // |extensions| List of providing extensions.
656 callback GetProvidingExtensionsCallback = void(ProvidingExtension[] extensions); 656 callback GetProvidingExtensionsCallback = void(ProvidingExtension[] extensions);
657 657
658 // |actions| List of actions. 658 // |actions| List of actions.
659 callback GetCustomActionsCallback = void(fileSystemProvider.Action[] actions); 659 callback GetCustomActionsCallback = void(fileSystemProvider.Action[] actions);
660 660
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after
755 SimpleCallback callback); 755 SimpleCallback callback);
756 756
757 // Requests additional properties for files. 757 // Requests additional properties for files.
758 // |entries| list of entries 758 // |entries| list of entries
759 // |names| list of requested properties by their names. 759 // |names| list of requested properties by their names.
760 // |callback| Completion callback. May return less than requested properties 760 // |callback| Completion callback. May return less than requested properties
761 // if some are not available. In the same time, it can return properties 761 // if some are not available. In the same time, it can return properties
762 // which were not requested (if it's cheap to compute them). 762 // which were not requested (if it's cheap to compute them).
763 [nocompile] 763 [nocompile]
764 static void getEntryProperties( 764 static void getEntryProperties(
765 [instanceOf=Entry] object[] entries, 765 [instanceOf=FileSystemEntry] object[] entries,
766 EntryPropertyName[] names, 766 EntryPropertyName[] names,
767 GetEntryPropertiesCallback callback); 767 GetEntryPropertiesCallback callback);
768 768
769 // Pins/unpins a Drive file in the cache. 769 // Pins/unpins a Drive file in the cache.
770 // |entry| Entry to pin/unpin. 770 // |entry| Entry to pin/unpin.
771 // |pin| Pass true to pin the file. 771 // |pin| Pass true to pin the file.
772 // |callback| Completion callback. $(ref:runtime.lastError) will be set if 772 // |callback| Completion callback. $(ref:runtime.lastError) will be set if
773 // there was an error. 773 // there was an error.
774 [nocompile] 774 [nocompile]
775 static void pinDriveFile([instanceof=Entry] object entry, 775 static void pinDriveFile([instanceof=Entry] object entry,
776 boolean pin, 776 boolean pin,
777 SimpleCallback callback); 777 SimpleCallback callback);
778 778
779 // Resolves entries in the isolated file system and returns corresponding 779 // Resolves entries in the isolated file system and returns corresponding
780 // entries in the external file system mounted to Chrome OS file manager 780 // entries in the external file system mounted to Chrome OS file manager
781 // backend. If resolving entry fails, the entry will be just ignored and the 781 // backend. If resolving entry fails, the entry will be just ignored and the
782 // corresponding entry does not appear in the result. 782 // corresponding entry does not appear in the result.
783 [nocompile] 783 [nocompile]
784 static void resolveIsolatedEntries( 784 static void resolveIsolatedEntries(
785 [instanceOf=Entry] object[] entries, 785 [instanceOf=FileSystemEntry] object[] entries,
786 ResolveEntriesCallback callback); 786 ResolveEntriesCallback callback);
787 787
788 // Mount a resource or a file. 788 // Mount a resource or a file.
789 // |source| Mount point source. For compressed files it is relative file path 789 // |source| Mount point source. For compressed files it is relative file path
790 // within external file system 790 // within external file system
791 // |callback| 791 // |callback|
792 static void addMount(DOMString source, AddMountCallback callback); 792 static void addMount(DOMString source, AddMountCallback callback);
793 793
794 // Unmounts a mounted resource. 794 // Unmounts a mounted resource.
795 // |volumeId| An ID of the volume. 795 // |volumeId| An ID of the volume.
(...skipping 15 matching lines...) Expand all
811 static void cancelAllFileTransfers(SimpleCallback callback); 811 static void cancelAllFileTransfers(SimpleCallback callback);
812 812
813 // Starts to copy an entry. If the source is a directory, the copy is done 813 // Starts to copy an entry. If the source is a directory, the copy is done
814 // recursively. 814 // recursively.
815 // |entry| Entry of the source entry to be copied. 815 // |entry| Entry of the source entry to be copied.
816 // |parentEntry| Entry for the destination (parent) directory. 816 // |parentEntry| Entry for the destination (parent) directory.
817 // |newName| Name of the new entry. It must not contain '/'. 817 // |newName| Name of the new entry. It must not contain '/'.
818 // |callback| Completion callback. 818 // |callback| Completion callback.
819 [nocompile] 819 [nocompile]
820 static void startCopy([instanceof=Entry] object entry, 820 static void startCopy([instanceof=Entry] object entry,
821 [instanceof=DirectoryEntry] object parentEntry, 821 [instanceof=FileSystemDirectoryEntry] object parentEntry ,
822 DOMString newName, 822 DOMString newName,
823 StartCopyCallback callback); 823 StartCopyCallback callback);
824 824
825 // Cancels the running copy task. 825 // Cancels the running copy task.
826 // |copyId| ID of the copy task to be cancelled. 826 // |copyId| ID of the copy task to be cancelled.
827 // |callback| Completion callback of the cancel. 827 // |callback| Completion callback of the cancel.
828 static void cancelCopy(long copyId, SimpleCallback callback); 828 static void cancelCopy(long copyId, SimpleCallback callback);
829 829
830 // Retrieves total and remaining size of a mount point. 830 // Retrieves total and remaining size of a mount point.
831 // |volumeId| ID of the volume to be checked. 831 // |volumeId| ID of the volume to be checked.
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
864 864
865 // Create a zip file for the selected files. 865 // Create a zip file for the selected files.
866 // |parentEntry| Entry of the directory containing the selected files. 866 // |parentEntry| Entry of the directory containing the selected files.
867 // |entries| Entries of the selected files. The files must be under the 867 // |entries| Entries of the selected files. The files must be under the
868 // directory specified by |parentEntry|. 868 // directory specified by |parentEntry|.
869 // |destName| Name of the destination zip file. The zip file will be created 869 // |destName| Name of the destination zip file. The zip file will be created
870 // under the directory specified by |parentEntry|. 870 // under the directory specified by |parentEntry|.
871 // |callback| 871 // |callback|
872 // TODO(mtomasz): Swap order of |entries| and |parentEntry|. 872 // TODO(mtomasz): Swap order of |entries| and |parentEntry|.
873 [nocompile] 873 [nocompile]
874 static void zipSelection([instanceof=DirectoryEntry] object parentEntry, 874 static void zipSelection([instanceof=FileSystemDirectoryEntry] object parentEn try,
875 [instanceof=Entry] object[] entries, 875 [instanceof=Entry] object[] entries,
876 DOMString destName, 876 DOMString destName,
877 ZipSelectionCallback callback); 877 ZipSelectionCallback callback);
878 878
879 // Retrieves the state of the current drive connection. 879 // Retrieves the state of the current drive connection.
880 // |callback| 880 // |callback|
881 static void getDriveConnectionState(GetDriveConnectionStateCallback callback); 881 static void getDriveConnectionState(GetDriveConnectionStateCallback callback);
882 882
883 // Checks whether the path name length fits in the limit of the filesystem. 883 // Checks whether the path name length fits in the limit of the filesystem.
884 // |parentEntry| The entry of the parent directory entry. 884 // |parentEntry| The entry of the parent directory entry.
885 // |name| The name of the file. 885 // |name| The name of the file.
886 // |callback| Called back when the check is finished. 886 // |callback| Called back when the check is finished.
887 [nocompile] 887 [nocompile]
888 static void validatePathNameLength( 888 static void validatePathNameLength(
889 [instanceof=DirectoryEntry] object parentEntry, 889 [instanceof=FileSystemDirectoryEntry] object parentEntry,
890 DOMString name, 890 DOMString name,
891 ValidatePathNameLengthCallback callback); 891 ValidatePathNameLengthCallback callback);
892 892
893 // Changes the zoom factor of the Files.app. 893 // Changes the zoom factor of the Files.app.
894 // |operation| Zooming mode. 894 // |operation| Zooming mode.
895 static void zoom(ZoomOperationType operation); 895 static void zoom(ZoomOperationType operation);
896 896
897 // Requests a Drive API OAuth2 access token. 897 // Requests a Drive API OAuth2 access token.
898 // |refresh| Whether the token should be refetched instead of using the cached 898 // |refresh| Whether the token should be refetched instead of using the cached
899 // one. 899 // one.
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after
1000 1000
1001 static void onPreferencesChanged(); 1001 static void onPreferencesChanged();
1002 1002
1003 static void onDriveConnectionStatusChanged(); 1003 static void onDriveConnectionStatusChanged();
1004 1004
1005 static void onDeviceChanged(DeviceEvent event); 1005 static void onDeviceChanged(DeviceEvent event);
1006 1006
1007 static void onDriveSyncError(DriveSyncErrorEvent event); 1007 static void onDriveSyncError(DriveSyncErrorEvent event);
1008 }; 1008 };
1009 }; 1009 };
OLDNEW
« no previous file with comments | « chrome/common/extensions/api/developer_private.idl ('k') | chrome/common/extensions/api/file_system.idl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698