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

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

Issue 550863003: Rename fileBrowserPrivate to fileManagerPrivate (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 3 months 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
(Empty)
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
3 // found in the LICENSE file.
4
5 // fileBrowserPrivate API.
6 // This is a private API used by the file browser of ChromeOS.
7 [platforms=("chromeos"),
8 implemented_in="chrome/browser/chromeos/extensions/file_manager/file_browser_pr ivate_api_functions.h"]
9 namespace fileBrowserPrivate {
10 // Type of the mounted volume.
11 enum VolumeType { drive, downloads, removable, archive, cloud_device, provided,
12 mtp, testing };
13
14 // Device type. Available if this is removable volume.
15 enum DeviceType { usb, sd, optical, mobile, unknown };
16
17 // Additional data about mount, for example, that the filesystem is not
18 // supported.
19 enum MountCondition { unknown, unsupported };
20
21 // Is the event raised for mounting or unmounting.
22 enum MountCompletedEventType { mount, unmount };
23
24 // Event type that tells listeners if mount was successful or an error
25 // occurred. It also specifies the error.
26 enum MountCompletedStatus {
27 success,
28 error_unknown,
29 error_internal,
30 error_invalid_argument,
31 error_invalid_path,
32 error_path_already_mounted,
33 error_path_not_mounted,
34 error_directory_creation_failed,
35 error_invalid_mount_options,
36 error_invalid_unmount_options,
37 error_insufficient_permissions,
38 error_mount_program_not_found,
39 error_mount_program_failed,
40 error_invalid_device_path,
41 error_unknown_filesystem,
42 error_unsupported_filesystem,
43 error_invalid_archive,
44 error_authentication,
45 error_path_unmounted
46 };
47
48 // File transfer progress state.
49 enum TransferState { added, started, in_progress, completed, failed };
50
51 // Defines file transfer direction.
52 enum TransferType { upload, download };
53
54 // The type of the progress event.
55 enum CopyProgressStatusType {
56 // "begin_copy_entry" is fired for each entry (file or directory) before
57 // starting the copy operation.
58 begin_copy_entry,
59
60 // "end_copy_entry" is fired for each entry (file or directory) after ending
61 // the copy operation.
62 end_copy_entry,
63
64 // "progress" is fired periodically to report progress of a file copy (not
65 // directory).
66 progress,
67
68 // "success" is fired after all entries are copied.
69 success,
70
71 // "error" is fired when an error occurs.
72 error
73 };
74
75 // Specifies type of event that is raised.
76 enum FileWatchEventType { changed, error };
77
78 // Specifies type of change in file watch event.
79 enum ChangeType { add_or_update, delete };
80
81 // The type of entry that is needed. Default to ALL.
82 enum SearchType { EXCLUDE_DIRECTORIES, SHARED_WITH_ME, OFFLINE, ALL };
83
84 // Zooming mode.
85 enum ZoomOperationType { in, out, reset };
86
87 // Specifies how to open inspector.
88 enum InspectionType {
89 // Open inspector for foreground page.
90 normal,
91 // Open inspector for foreground page and bring focus to the console.
92 console,
93 // Open inspector for foreground page in inspect element mode.
94 element,
95 // Open inspector for background page.
96 background
97 };
98
99 // Device event type.
100 enum DeviceEventType {
101 // Device scan is started.
102 scan_started,
103 // Device scan is cancelled.
104 scan_cancelled,
105 // If the device is disabled by preference.
106 disabled,
107 // Device is removed.
108 removed,
109 // Device is hard unplugged.
110 hard_unplugged,
111 // Format started.
112 format_start,
113 // Format succeeded.
114 format_success,
115 // Format failed.
116 format_fail
117 };
118
119 // Drive sync error type.
120 // Keep it synced with DriveSyncErrorType in operation_observer.h.
121 enum DriveSyncErrorType {
122 // Request to delete a file without permission.
123 delete_without_permission,
124 // Google Drive is temporarily unavailable.
125 service_unavailable,
126 // Miscellaneous errors other than listed above.
127 misc
128 };
129
130 // Result of task execution.
131 enum TaskResult {
132 // The task execution succeeded and a new window/tab was opened.
133 opened,
134 // The task execution succeeded and the message was sent to the proper
135 // extension.
136 message_sent,
137 // The task execution failed.
138 failed,
139 // No URL is specified.
140 empty
141 };
142
143 // Drive share type.
144 enum DriveShareType {
145 can_edit,
146 can_comment,
147 can_view
148 };
149
150 // ImageSet that represents multi-scale images.
151 dictionary ImageSet {
152 // 1x scale URL.
153 DOMString scale1xUrl;
154 // 2x scale URL.
155 DOMString scale2xUrl;
156 };
157
158 // A file task represents an action that the file manager can perform over the
159 // currently selected files. See
160 // chrome/browser/chromeos/extensions/file_manager/file_tasks.h for details
161 // about how file tasks are handled.
162 dictionary FileTask {
163 // The unique identifier of the task.
164 DOMString taskId;
165
166 // Task title (ex. App name).
167 DOMString title;
168
169 // Task icon url (from chrome://extension-icon/...)
170 DOMString iconUrl;
171
172 // True if this task is a default task for the selected files.
173 boolean isDefault;
174 };
175
176 // Additional entry properties.
177 dictionary EntryProperties {
178 // Size of this file.
179 double? fileSize;
180
181 // Timestamp of entry update time, in milliseconds past the epoch.
182 double? lastModifiedTime;
183
184 // URL to the Drive thumbnail image for this file.
185 DOMString? thumbnailUrl;
186
187 // Width, if the entry is an image.
188 long? imageWidth;
189
190 // Height, if the entry is an image.
191 long? imageHeight;
192
193 // Rotation in clockwise degrees, if the entry is an image.
194 long? imageRotation;
195
196 // True if the file is pinned in cache.
197 boolean? isPinned;
198
199 // True if the file is present in cache.
200 boolean? isPresent;
201
202 // True if the file is hosted on a server instead of local.
203 boolean? isHosted;
204
205 // True if the file is available offline.
206 boolean? isAvailableOffline;
207
208 // True if the file is available on metered connection.
209 boolean? isAvailableWhenMetered;
210
211 // URL to the custom icon for this file.
212 DOMString? customIconUrl;
213
214 // Drive MIME type for this file.
215 DOMString? contentMimeType;
216
217 // True if the entry is labeled as shared-with-me.
218 boolean? sharedWithMe;
219
220 // True if the entry is labeled as shared (either from me to others or to me
221 // by others.)
222 boolean? shared;
223 };
224
225 // Information about total and remaining size on the mount point.
226 dictionary MountPointSizeStats {
227 // Approximate total available size on the mount point.
228 double totalSize;
229
230 // Approximate remaining available size on the mount point.
231 double remainingSize;
232 };
233
234 // Information about a profile.
235 dictionary ProfileInfo {
236 // Profile ID. This is currently e-mail address of the profile.
237 DOMString profileId;
238
239 // The name of the profile for display purpose.
240 DOMString displayName;
241
242 // True if the profile is the one running the current file manager instance.
243 // TODO(hirono): Remove the property because of the design change of
244 // multi-profile suuport.
245 boolean isCurrentProfile;
246 };
247
248 // Mounted disk volume metadata.
249 dictionary VolumeMetadata {
250 // ID of the disk volume.
251 DOMString volumeId;
252
253 // Id the provided file system (for proviided file systems).
254 DOMString? fileSystemId;
255
256 // Extension providing this volume (for provided file systems).
257 DOMString? extensionId;
258
259 // Label of the volume (if available).
260 DOMString? volumeLabel;
261
262 // Description of the profile where the volume belongs.
263 // TODO(hirono): Remove the property because of the design change of
264 // multi-profile support.
265 ProfileInfo profile;
266
267 // The path to the mounted device, archive file or network resource.
268 DOMString? sourcePath;
269
270 // Type of the mounted volume.
271 VolumeType volumeType;
272
273 // Device type. Available if this is removable volume.
274 DeviceType? deviceType;
275
276 // Path to identify the device. This is consistent with DeviceEvent's
277 // devicePath.
278 DOMString? devicePath;
279
280 // Whether the device is parent or not (i.e. sdb rather than sdb1).
281 boolean? isParentDevice;
282
283 // Flag that specifies if volume is mounted in read-only mode.
284 boolean isReadOnly;
285
286 // Additional data about mount, for example, that the filesystem is not
287 // supported.
288 MountCondition? mountCondition;
289 };
290
291 // Payload data for mount event.
292 dictionary MountCompletedEvent {
293 // Is the event raised for mounting or unmounting.
294 MountCompletedEventType eventType;
295
296 // Event type that tells listeners if mount was successful or an error
297 // occurred. It also specifies the error.
298 MountCompletedStatus status;
299
300 // Metadata of the mounted volume.
301 VolumeMetadata volumeMetadata;
302
303 // Whether the volume event should be notified or not.
304 boolean shouldNotify;
305 };
306
307 // Payload data for file transfer status updates.
308 dictionary FileTransferStatus {
309 // URL of file that is being transfered.
310 DOMString fileUrl;
311
312 // File transfer progress state.
313 TransferState transferState;
314
315 // Defines file transfer direction.
316 TransferType transferType;
317
318 // Approximated completed portion of the transfer operation.
319 double? processed;
320
321 // Approximated total size of transfer operation.
322 double? total;
323
324 // Total number of jobs.
325 long num_total_jobs;
326 };
327
328 // Error during the drive sync.
329 dictionary DriveSyncErrorEvent {
330 // Error type.
331 DriveSyncErrorType type;
332
333 // File URL of the entry that the error happens to.
334 DOMString fileUrl;
335 };
336
337 // Payload data for copy status progress updates.
338 dictionary CopyProgressStatus {
339 // The type of the progress event.
340 CopyProgressStatusType type;
341
342 // URL for the entry currently being copied. This field is particularly useful
343 // when a directory copy is initiated with startCopy(). The field tells what
344 // file/directory in that directory is now being copied.
345 DOMString? sourceUrl;
346
347 // URL for the entry currently being created. This field is particularly
348 // useful when a directory copy is initiated with startCopy(). The field tells
349 // what file/directory in that directory is being created. Available only for
350 // end_copy_entry and success.
351 DOMString? destinationUrl;
352
353 // Number of processed bytes for the file currently being copied. Available
354 // only for "progress" event. To show the progress bar, a caller needs to
355 // pre-compute the size of files being copied for the file (not directory).
356 double? size;
357
358 // DOMError's name. Available only for ERROR event.
359 DOMString? error;
360 };
361
362 // Payload data for file transfer cancel response.
363 dictionary FileTransferCancelStatus {
364 // URL of file that is being transfered.
365 DOMString fileUrl;
366
367 // True if ongoing transfer operation was found and canceled.
368 boolean canceled;
369 };
370
371 // Detailed information of change.
372 dictionary FileChange {
373 // URL of changed file (or directory).
374 DOMString url;
375
376 // Type of change, which may be multiple.
377 ChangeType[] changes;
378 };
379
380 // Directory change notification details.
381 dictionary FileWatchEvent {
382 // Specifies type of event that is raised.
383 FileWatchEventType eventType;
384
385 // An Entry object which represents a changed directory. The conversion into a
386 // kind of FileEntry object is done in
387 // file_browser_handler_custom_bindings.cc. For filesystem API's Entry
388 // interface, see <a
389 // href='http://www.w3.org/TR/file-system-api/#the-entry-interface'>The Entry
390 // interface</a>.
391 [instanceOf=Entry] object entry;
392
393 // Detailed change information of change. It would be null if the detailed
394 // information is not available.
395 FileChange[]? changedFiles;
396 };
397
398 dictionary Preferences {
399 boolean driveEnabled;
400 boolean cellularDisabled;
401 boolean hostedFilesDisabled;
402 boolean use24hourClock;
403 boolean allowRedeemOffers;
404 };
405
406 dictionary PreferencesChange {
407 boolean? cellularDisabled;
408 boolean? hostedFilesDisabled;
409 };
410
411 dictionary SearchParams {
412 // Search query.
413 DOMString query;
414
415 // ID of the search feed that should be fetched next. Value passed here should
416 // be gotten from previous searchDrive call. It can be empty for the initial
417 // search request.
418 DOMString nextFeed;
419 };
420
421 dictionary SearchMetadataParams {
422 // Search query. It can be empty. Any filename matches to an empty query.
423 DOMString query;
424
425 // The type of entry that is needed. Default to ALL.
426 SearchType types;
427
428 // Maximum number of results.
429 long maxResults;
430 };
431
432 // Entry and Drive-related properties representing a search result.
433 dictionary SearchResult {
434 // A dictionary object which represents a Drive file. This will be converted
435 // into a kind of FileEntry object. See
436 // file_browser_handler_custom_bindings.cc for details. For filesystem API's
437 // Entry interface, see <a
438 // href='http://www.w3.org/TR/file-system-api/#the-entry-interface'>The Entry
439 // interface</a>.
440 [instanceOf=Entry] object entry;
441
442 // The base name of a Drive file that matched the search query. The matched
443 // sub strings are highlighted with <b> element. Meta characters are escaped
444 // like &lt;.
445 DOMString highlightedBaseName;
446 };
447
448 dictionary DriveConnectionState {
449 DOMString type;
450
451 // Reasons of offline.
452 DOMString? reason;
453 };
454
455 // Device event dispatched to listeners of onDeviceChaged. See also
456 // DeviceEventType to know when the event dispatched.
457 dictionary DeviceEvent {
458 // Event type of the device event.
459 DeviceEventType type;
460 // Device path to identify the device.
461 DOMString devicePath;
462 };
463
464 // Callback that does not take arguments.
465 callback SimpleCallback = void();
466
467 // |result| Result of the task execution.
468 callback ExecuteTaskCallback = void(TaskResult result);
469
470 // |tasks| The list of matched file URL patterns for this task.
471 callback GetFileTasksCallback = void(FileTask[] tasks);
472
473 // |result| Hash containing the string assets.
474 callback GetStringsCallback = void(object result);
475
476 // |success| True when file watch is successfully added.
477 callback AddFileWatchCallback = void(optional boolean success);
478
479 // |success| True when file watch is successfully removed.
480 callback RemoveFileWatchCallback = void(optional boolean success);
481
482 // |fileSystem| A DOMFileSystem instance for local file system access. null if
483 // the caller has no appropriate permissions.
484 callback RequestFileSystemCallback = void(optional object fileSystem);
485
486 // |entryProperties| A dictionary containing properties of the requested
487 // entries.
488 callback GetEntryPropertiesCallback =
489 void(EntryProperties[] entryProperties);
490
491 // |localFilePaths| An array of the local file paths for the requested files,
492 // one entry for each file in fileUrls.
493 callback GetDriveFilesCallback = void(DOMString[] localFilePaths);
494
495 // |sourcePath| Source path of the mount.
496 callback AddMountCallback = void(DOMString sourcePath);
497
498 // |volumeMetadataList| The list of VolumeMetadata representing mounted volumes.
499 callback GetVolumeMetadataListCallback =
500 void(VolumeMetadata[] volumeMetadataList);
501
502 // |fileTransferCancelStatuses| The list of FileTransferCancelStatus.
503 callback CancelFileTransfersCallback =
504 void(FileTransferCancelStatus[] fileTransferCancelStatuses);
505
506 // |copyId| ID of the copy task. Can be used to identify the progress, and to
507 // cancel the task.
508 callback StartCopyCallback = void(long copyId);
509
510 // |sizeStats| Name/value pairs of size stats. Will be undefined if stats could
511 // not be determined.
512 callback GetSizeStatsCallback = void(optional MountPointSizeStats sizeStats);
513
514 callback GetPreferencesCallback = void(Preferences result);
515
516 // |entries|
517 // |nextFeed| ID of the feed that contains next chunk of the search result.
518 // Should be sent to the next searchDrive request to perform
519 // incremental search.
520 callback SearchDriveCallback =
521 void([instanceOf=Entry] object[] entries, DOMString nextFeed);
522
523 callback SearchDriveMetadataCallback = void(SearchResult[] results);
524
525 callback ZipSelectionCallback = void(optional boolean success);
526
527 callback GetDriveConnectionStateCallback = void(DriveConnectionState result);
528
529 // |result| true if the length is in the valid range, false otherwise.
530 callback ValidatePathNameLengthCallback = void(boolean result);
531
532 // |accessToken| OAuth2 access token, or an empty string if failed to fetch.
533 callback RequestAccessTokenCallback = void(DOMString accessToken);
534
535 // |accessToken| OAuth2 access token, or an empty string if failed to fetch.
536 callback RequestWebStoreAccessTokenCallback = void(DOMString accessToken);
537
538 // |url| Result url.
539 callback GetUrlCallback = void(DOMString url);
540
541 // |profiles| List of profile information.
542 // |runningProfile| ID of the profile that runs the application instance.
543 // |showingProfile| ID of the profile that shows the application window.
544 callback GetProfilesCallback = void(ProfileInfo[] profiles,
545 DOMString runningProfile,
546 DOMString displayProfile);
547
548 // |entryUrl| URL of an entry in a normal file system.
549 callback ResolveEntriesCallback =
550 void([instanceOf=FileEntry] object[] entries);
551
552 interface Functions {
553 // Logout the current user for navigating to the re-authentication screen for
554 // the Google account.
555 static void logoutUserForReauthentication();
556
557 // Cancels file selection.
558 static void cancelDialog();
559
560 // Executes file browser task over selected files.
561 // |taskId| The unique identifier of task to execute.
562 // |fileUrls| Array of file URLs
563 // |callback|
564 static void executeTask(DOMString taskId,
565 DOMString[] fileUrls,
566 optional ExecuteTaskCallback callback);
567
568 // Sets the default task for the supplied MIME types and suffixes of the
569 // supplied file URLs. Lists of MIME types and URLs may contain duplicates.
570 // |taskId| The unique identifier of task to mark as default.
571 // |fileUrls| Array of selected file URLs to extract suffixes from.
572 // |mimeTypes| Array of selected file MIME types.
573 // |callback|
574 static void setDefaultTask(DOMString taskId,
575 DOMString[] fileUrls,
576 optional DOMString[] mimeTypes,
577 optional SimpleCallback callback);
578
579 // Gets the list of tasks that can be performed over selected files.
580 // |fileUrls| Array of selected file URLs
581 // |callback|
582 static void getFileTasks(DOMString[] fileUrls,
583 GetFileTasksCallback callback);
584
585 // Gets localized strings and initialization data.
586 // |callback|
587 static void getStrings(GetStringsCallback callback);
588
589 // Adds file watch.
590 // |fileUrl| URL of file to watch
591 // |callback|
592 static void addFileWatch(DOMString fileUrl, AddFileWatchCallback callback);
593
594 // Removes file watch.
595 // |fileUrl| URL of watched file to remove
596 // |callback|
597 static void removeFileWatch(DOMString fileUrl,
598 RemoveFileWatchCallback callback);
599
600 // Requests access to a file system volume.
601 // |volumeId| The ID of the file system volume to request. The volume ID is
602 // delivered to JavaScript as part of VolumeMetadata. By specifying
603 // "compatible", this function behaves in the compatible mode, where the
604 // returned FileSystem object gives access to all file system volumes such
605 // as Downloads folder and removal media like SD cards (i.e. all volumes
606 // are provided inside the single FileSystem object). In the new
607 // "per-volume FileSystem object model" crbug.com/322305, a separate
608 // FileSystem object is created for each volume. "compatible" parameter
609 // will be removed once Files.app is switched to the per-volume FileSystem
610 // object model.
611 // |callback|
612 static void requestFileSystem(DOMString volumeId,
613 RequestFileSystemCallback callback);
614
615 // Selects multiple files.
616 // |selectedPaths| Array of selected paths
617 // |shouldReturnLocalPath| true if paths need to be resolved to local paths.
618 // |callback|
619 static void selectFiles(DOMString[] selectedPaths,
620 boolean shouldReturnLocalPath,
621 SimpleCallback callback);
622
623 // Selects a file.
624 // |selectedPath| A selected path
625 // |index| Index of Filter
626 // |forOpening| true if paths are selected for opening. false if for saving.
627 // |shouldReturnLocalPath| true if paths need to be resolved to local paths.
628 // |callback|
629 static void selectFile(DOMString selectedPath,
630 long index,
631 boolean forOpening,
632 boolean shouldReturnLocalPath,
633 SimpleCallback callback);
634
635 // Requests additional properties for files.
636 // |fileUrls| list of URLs of files
637 // |callback|
638 static void getEntryProperties(
639 DOMString[] fileUrls,
640 GetEntryPropertiesCallback callback);
641
642 // Pins/unpins a Drive file in the cache.
643 // |fileUrl| URL of a file to pin/unpin.
644 // |pin| Pass true to pin the file.
645 // |callback| Completion callback. $(ref:runtime.lastError) will be set if
646 // there was an error.
647 static void pinDriveFile(DOMString fileUrl,
648 boolean pin,
649 optional SimpleCallback callback);
650
651 // Get Drive files.
652 // |fileUrls| Array of Drive file URLs to get.
653 // |callback|
654 static void getDriveFiles(DOMString[] fileUrls,
655 GetDriveFilesCallback callback);
656
657 // Resolves file entries in the isolated file system and returns corresponding
658 // entries in the external file system mounted to Chrome OS file manager
659 // backend. If resolving entry fails, the entry will be just ignored and the
660 // corresponding entry does not appear in the result.
661 [nocompile]
662 static void resolveIsolatedEntries(
663 [instanceOf=FileEntry] object[] entries,
664 ResolveEntriesCallback callback);
665
666 // Mount a resource or a file.
667 // |source| Mount point source. For compressed files it is relative file path
668 // within external file system
669 // |callback|
670 static void addMount(DOMString source, AddMountCallback callback);
671
672 // Unmounts a mounted resource.
673 // |volumeId| An ID of the volume.
674 static void removeMount(DOMString volumeId);
675
676 // Get the list of mounted volumes.
677 // |callback|
678 static void getVolumeMetadataList(GetVolumeMetadataListCallback callback);
679
680 // Cancels ongoing file transfers for selected files.
681 // |fileUrls| Array of files for which ongoing transfer should be canceled.
682 // |callback|
683 static void cancelFileTransfers(DOMString[] fileUrls,
684 CancelFileTransfersCallback callback);
685
686 // Starts to copy an entry. If the source is a directory, the copy is done
687 // recursively.
688 // |sourceUrl| URL of the source entry to be copied.
689 // |parent| URL of the destination directory.
690 // |newName| Name of the new entry. It shouldn't contain '/'.
691 // |callback| Completion callback.
692 static void startCopy(DOMString sourceUrl,
693 DOMString parent,
694 DOMString newName,
695 StartCopyCallback callback);
696
697 // Cancels the running copy task.
698 // |copyId| ID of the copy task to be cancelled.
699 // |callback| Completion callback of the cancel.
700 static void cancelCopy(long copyId, optional SimpleCallback callback);
701
702 // Retrieves total and remaining size of a mount point.
703 // |volumeId| ID of the volume to be checked.
704 // |callback|
705 static void getSizeStats(DOMString volumeId, GetSizeStatsCallback callback);
706
707 // Formats a mounted volume.
708 // |volumeId| ID of the volume to be formatted.
709 static void formatVolume(DOMString volumeId);
710
711 // Retrieves file manager preferences.
712 // |callback|
713 static void getPreferences(GetPreferencesCallback callback);
714
715 // Sets file manager preferences.
716 // |changeInfo|
717 static void setPreferences(PreferencesChange changeInfo);
718
719 // Performs drive content search.
720 // |searchParams|
721 // |callback|
722 static void searchDrive(SearchParams searchParams,
723 SearchDriveCallback callback);
724
725 // Performs drive metadata search.
726 // |searchParams|
727 // |callback|
728 static void searchDriveMetadata(SearchMetadataParams searchParams,
729 SearchDriveMetadataCallback callback);
730
731 // Create a zip file for the selected files.
732 // |dirURL| URL of the directory containing the selected files.
733 // |selectionUrls| URLs of the selected files. The files must be under the
734 // directory specified by dirURL.
735 // |destName| Name of the destination zip file. The zip file will be created
736 // under the directory specified by dirURL.
737 // |callback|
738 static void zipSelection(DOMString dirURL,
739 DOMString[] selectionUrls,
740 DOMString destName,
741 optional ZipSelectionCallback callback);
742
743 // Retrieves the state of the current drive connection.
744 // |callback|
745 static void getDriveConnectionState(GetDriveConnectionStateCallback callback);
746
747 // Checks whether the path name length fits in the limit of the filesystem.
748 // |parent_directory_url| The URL of the parent directory entry.
749 // |name| The name of the file.
750 // |callback| Called back when the check is finished.
751 static void validatePathNameLength(DOMString parent_directory_url,
752 DOMString name,
753 ValidatePathNameLengthCallback callback);
754
755 // Changes the zoom factor of the Files.app.
756 // |operation| Zooming mode.
757 static void zoom(ZoomOperationType operation);
758
759 // Requests a Drive API OAuth2 access token.
760 // |refresh| Whether the token should be refetched instead of using the cached
761 // one.
762 // |callback|
763 static void requestAccessToken(boolean refresh,
764 RequestAccessTokenCallback callback);
765
766 // Requests a Webstore API OAuth2 access token.
767 // |callback|
768 static void requestWebStoreAccessToken(
769 RequestWebStoreAccessTokenCallback callback);
770
771 // Requests a share dialog url for the specified file.
772 // |url| Url for the file.
773 // |callback|
774 static void getShareUrl(DOMString url, GetUrlCallback callback);
775
776 // Requests a download url to download the file contents.
777 // |url| Url for the file.
778 // |callback|
779 static void getDownloadUrl(DOMString url, GetUrlCallback callback);
780
781 // Requests to share drive files.
782 // |url| URL of a file to be shared.
783 // |shareType| Type of access that is getting granted.
784 static void requestDriveShare(DOMString url,
785 DriveShareType shareType,
786 SimpleCallback callback);
787
788 // Requests to install a webstore item.
789 // |item_id| The id of the item to install.
790 // |silentInstallation| False to show installation prompt. True not to show.
791 // |callback|
792 static void installWebstoreItem(DOMString itemId,
793 boolean silentInstallation,
794 SimpleCallback callback);
795
796 // Obtains a list of profiles that are logged-in.
797 static void getProfiles(GetProfilesCallback callback);
798
799 // Moves the window to other user's desktop.
800 static void visitDesktop(DOMString profileId,
801 optional SimpleCallback callback);
802
803 // Opens inspector window.
804 // |type| InspectionType which specifies how to open inspector.
805 static void openInspector(InspectionType type);
806 };
807
808 interface Events {
809 static void onMountCompleted(MountCompletedEvent event);
810
811 static void onFileTransfersUpdated(FileTransferStatus event);
812
813 static void onCopyProgress(long copyId, CopyProgressStatus status);
814
815 static void onDirectoryChanged(FileWatchEvent event);
816
817 static void onPreferencesChanged();
818
819 static void onDriveConnectionStatusChanged();
820
821 static void onDeviceChanged(DeviceEvent event);
822
823 static void onDriveSyncError(DriveSyncErrorEvent event);
824 };
825 };
OLDNEW
« no previous file with comments | « chrome/common/extensions/api/_permission_features.json ('k') | chrome/common/extensions/api/file_browser_private_internal.idl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698