OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 #ifndef CHROME_BROWSER_CHROMEOS_EXTENSIONS_FILE_MANAGER_FILE_BROWSER_PRIVATE_API
_H_ | 5 #ifndef CHROME_BROWSER_CHROMEOS_EXTENSIONS_FILE_MANAGER_FILE_BROWSER_PRIVATE_API
_H_ |
6 #define CHROME_BROWSER_CHROMEOS_EXTENSIONS_FILE_MANAGER_FILE_BROWSER_PRIVATE_API
_H_ | 6 #define CHROME_BROWSER_CHROMEOS_EXTENSIONS_FILE_MANAGER_FILE_BROWSER_PRIVATE_API
_H_ |
7 | 7 |
8 #include <map> | 8 #include <map> |
9 #include <queue> | 9 #include <queue> |
10 #include <string> | 10 #include <string> |
(...skipping 519 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
530 virtual ~PinDriveFileFunction(); | 530 virtual ~PinDriveFileFunction(); |
531 | 531 |
532 // AsyncExtensionFunction overrides. | 532 // AsyncExtensionFunction overrides. |
533 virtual bool RunImpl() OVERRIDE; | 533 virtual bool RunImpl() OVERRIDE; |
534 | 534 |
535 private: | 535 private: |
536 // Callback for RunImpl(). | 536 // Callback for RunImpl(). |
537 void OnPinStateSet(drive::FileError error); | 537 void OnPinStateSet(drive::FileError error); |
538 }; | 538 }; |
539 | 539 |
540 // Get file locations for the given list of file URLs. Returns a list of | |
541 // location identifiers, like ['drive', 'local'], where 'drive' means the | |
542 // file is on gdata, and 'local' means the file is on the local drive. | |
543 class GetFileLocationsFunction : public FileBrowserFunction { | |
544 public: | |
545 DECLARE_EXTENSION_FUNCTION("fileBrowserPrivate.getFileLocations", | |
546 FILEBROWSERPRIVATE_GETFILELOCATIONS) | |
547 | |
548 GetFileLocationsFunction(); | |
549 | |
550 protected: | |
551 virtual ~GetFileLocationsFunction(); | |
552 | |
553 // AsyncExtensionFunction overrides. | |
554 virtual bool RunImpl() OVERRIDE; | |
555 }; | |
556 | |
557 // Get gdata files for the given list of file URLs. Initiate downloading of | 540 // Get gdata files for the given list of file URLs. Initiate downloading of |
558 // gdata files if these are not cached. Return a list of local file names. | 541 // gdata files if these are not cached. Return a list of local file names. |
559 // This function puts empty strings instead of local paths for files could | 542 // This function puts empty strings instead of local paths for files could |
560 // not be obtained. For instance, this can happen if the user specifies a new | 543 // not be obtained. For instance, this can happen if the user specifies a new |
561 // file name to save a file on gdata. There may be other reasons to fail. The | 544 // file name to save a file on gdata. There may be other reasons to fail. The |
562 // file manager should check if the local paths returned from getDriveFiles() | 545 // file manager should check if the local paths returned from getDriveFiles() |
563 // contain empty paths. | 546 // contain empty paths. |
564 // TODO(satorux): Should we propagate error types to the JavasScript layer? | 547 // TODO(satorux): Should we propagate error types to the JavasScript layer? |
565 class GetDriveFilesFunction : public FileBrowserFunction { | 548 class GetDriveFilesFunction : public FileBrowserFunction { |
566 public: | 549 public: |
(...skipping 251 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
818 OpenNewWindowFunction(); | 801 OpenNewWindowFunction(); |
819 | 802 |
820 protected: | 803 protected: |
821 virtual ~OpenNewWindowFunction(); | 804 virtual ~OpenNewWindowFunction(); |
822 | 805 |
823 // AsyncExtensionFunction overrides. | 806 // AsyncExtensionFunction overrides. |
824 virtual bool RunImpl() OVERRIDE; | 807 virtual bool RunImpl() OVERRIDE; |
825 }; | 808 }; |
826 | 809 |
827 #endif // CHROME_BROWSER_CHROMEOS_EXTENSIONS_FILE_MANAGER_FILE_BROWSER_PRIVATE_
API_H_ | 810 #endif // CHROME_BROWSER_CHROMEOS_EXTENSIONS_FILE_MANAGER_FILE_BROWSER_PRIVATE_
API_H_ |
OLD | NEW |