| 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 270 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 281 struct GetSelectedFileInfoParams; | 281 struct GetSelectedFileInfoParams; |
| 282 | 282 |
| 283 // Used to implement GetSelectedFileInfo(). | 283 // Used to implement GetSelectedFileInfo(). |
| 284 void GetSelectedFileInfoInternal( | 284 void GetSelectedFileInfoInternal( |
| 285 scoped_ptr<GetSelectedFileInfoParams> params); | 285 scoped_ptr<GetSelectedFileInfoParams> params); |
| 286 | 286 |
| 287 // Used to implement GetSelectedFileInfo(). | 287 // Used to implement GetSelectedFileInfo(). |
| 288 void ContinueGetSelectedFileInfo(scoped_ptr<GetSelectedFileInfoParams> params, | 288 void ContinueGetSelectedFileInfo(scoped_ptr<GetSelectedFileInfoParams> params, |
| 289 drive::FileError error, | 289 drive::FileError error, |
| 290 const base::FilePath& local_file_path, | 290 const base::FilePath& local_file_path, |
| 291 const std::string& mime_type, | 291 scoped_ptr<drive::ResourceEntry> entry); |
| 292 drive::DriveFileType file_type); | |
| 293 }; | 292 }; |
| 294 | 293 |
| 295 // Select a single file. Closes the dialog window. | 294 // Select a single file. Closes the dialog window. |
| 296 class SelectFileFunction : public FileBrowserFunction { | 295 class SelectFileFunction : public FileBrowserFunction { |
| 297 public: | 296 public: |
| 298 DECLARE_EXTENSION_FUNCTION("fileBrowserPrivate.selectFile", | 297 DECLARE_EXTENSION_FUNCTION("fileBrowserPrivate.selectFile", |
| 299 FILEBROWSERPRIVATE_SELECTFILE) | 298 FILEBROWSERPRIVATE_SELECTFILE) |
| 300 | 299 |
| 301 SelectFileFunction() {} | 300 SelectFileFunction() {} |
| 302 | 301 |
| (...skipping 282 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 585 | 584 |
| 586 private: | 585 private: |
| 587 // Gets the file on the top of the |remaining_drive_paths_| or sends the | 586 // Gets the file on the top of the |remaining_drive_paths_| or sends the |
| 588 // response if the queue is empty. | 587 // response if the queue is empty. |
| 589 void GetFileOrSendResponse(); | 588 void GetFileOrSendResponse(); |
| 590 | 589 |
| 591 // Called by FileSystem::GetFile(). Pops the file from | 590 // Called by FileSystem::GetFile(). Pops the file from |
| 592 // |remaining_drive_paths_|, and calls GetFileOrSendResponse(). | 591 // |remaining_drive_paths_|, and calls GetFileOrSendResponse(). |
| 593 void OnFileReady(drive::FileError error, | 592 void OnFileReady(drive::FileError error, |
| 594 const base::FilePath& local_path, | 593 const base::FilePath& local_path, |
| 595 const std::string& unused_mime_type, | 594 scoped_ptr<drive::ResourceEntry> entry); |
| 596 drive::DriveFileType file_type); | |
| 597 | 595 |
| 598 std::queue<base::FilePath> remaining_drive_paths_; | 596 std::queue<base::FilePath> remaining_drive_paths_; |
| 599 ListValue* local_paths_; | 597 ListValue* local_paths_; |
| 600 }; | 598 }; |
| 601 | 599 |
| 602 // Implements the chrome.fileBrowserPrivate.cancelFileTransfers method. | 600 // Implements the chrome.fileBrowserPrivate.cancelFileTransfers method. |
| 603 class CancelFileTransfersFunction : public FileBrowserFunction { | 601 class CancelFileTransfersFunction : public FileBrowserFunction { |
| 604 public: | 602 public: |
| 605 DECLARE_EXTENSION_FUNCTION("fileBrowserPrivate.cancelFileTransfers", | 603 DECLARE_EXTENSION_FUNCTION("fileBrowserPrivate.cancelFileTransfers", |
| 606 FILEBROWSERPRIVATE_CANCELFILETRANSFERS) | 604 FILEBROWSERPRIVATE_CANCELFILETRANSFERS) |
| (...skipping 220 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 827 OpenNewWindowFunction(); | 825 OpenNewWindowFunction(); |
| 828 | 826 |
| 829 protected: | 827 protected: |
| 830 virtual ~OpenNewWindowFunction(); | 828 virtual ~OpenNewWindowFunction(); |
| 831 | 829 |
| 832 // AsyncExtensionFunction overrides. | 830 // AsyncExtensionFunction overrides. |
| 833 virtual bool RunImpl() OVERRIDE; | 831 virtual bool RunImpl() OVERRIDE; |
| 834 }; | 832 }; |
| 835 | 833 |
| 836 #endif // CHROME_BROWSER_CHROMEOS_EXTENSIONS_FILE_MANAGER_FILE_BROWSER_PRIVATE_
API_H_ | 834 #endif // CHROME_BROWSER_CHROMEOS_EXTENSIONS_FILE_MANAGER_FILE_BROWSER_PRIVATE_
API_H_ |
| OLD | NEW |