| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 PPAPI_CPP_DEV_FILE_CHOOSER_DEV_H_ | 5 #ifndef PPAPI_CPP_DEV_FILE_CHOOSER_DEV_H_ |
| 6 #define PPAPI_CPP_DEV_FILE_CHOOSER_DEV_H_ | 6 #define PPAPI_CPP_DEV_FILE_CHOOSER_DEV_H_ |
| 7 | 7 |
| 8 #include "ppapi/c/dev/ppb_file_chooser_dev.h" | 8 #include "ppapi/c/dev/ppb_file_chooser_dev.h" |
| 9 #include "ppapi/cpp/resource.h" | 9 #include "ppapi/cpp/resource.h" |
| 10 | 10 |
| 11 namespace pp { | 11 namespace pp { |
| (...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 48 | 48 |
| 49 FileChooser_Dev(const FileChooser_Dev& other); | 49 FileChooser_Dev(const FileChooser_Dev& other); |
| 50 | 50 |
| 51 /// This function displays a previously created file chooser resource as a | 51 /// This function displays a previously created file chooser resource as a |
| 52 /// dialog box, prompting the user to choose a file or files. The callback is | 52 /// dialog box, prompting the user to choose a file or files. The callback is |
| 53 /// called with PP_OK on successful completion with a file (or files) selected | 53 /// called with PP_OK on successful completion with a file (or files) selected |
| 54 /// or PP_ERROR_USERCANCEL if the user selected no file. | 54 /// or PP_ERROR_USERCANCEL if the user selected no file. |
| 55 /// | 55 /// |
| 56 /// @return PP_OK_COMPLETIONPENDING if request to show the dialog was | 56 /// @return PP_OK_COMPLETIONPENDING if request to show the dialog was |
| 57 /// successful, another error code from pp_errors.h on failure. | 57 /// successful, another error code from pp_errors.h on failure. |
| 58 int32_t Show(const CompletionCallback& cc); | 58 virtual int32_t Show(const CompletionCallback& cc); |
| 59 | 59 |
| 60 /// After a successful completion callback call from Show, this method may be | 60 /// After a successful completion callback call from Show, this method may be |
| 61 /// used to query the chosen files. It should be called in a loop until it | 61 /// used to query the chosen files. It should be called in a loop until it |
| 62 /// returns an is_null() FileRef. Depending on the PP_ChooseFileMode | 62 /// returns an is_null() FileRef. Depending on the PP_ChooseFileMode |
| 63 /// requested when the FileChooser was created, the file refs will either | 63 /// requested when the FileChooser was created, the file refs will either |
| 64 /// be readable or writable. Their file system type will be | 64 /// be readable or writable. Their file system type will be |
| 65 /// PP_FileSystemType_External. If the user chose no files or cancelled the | 65 /// PP_FileSystemType_External. If the user chose no files or cancelled the |
| 66 /// dialog, then this method will simply return an is_null() FileRef the | 66 /// dialog, then this method will simply return an is_null() FileRef the |
| 67 /// first time it is called. | 67 /// first time it is called. |
| 68 FileRef GetNextChosenFile() const; | 68 virtual FileRef GetNextChosenFile() const; |
| 69 }; | 69 }; |
| 70 | 70 |
| 71 } // namespace pp | 71 } // namespace pp |
| 72 | 72 |
| 73 #endif // PPAPI_CPP_DEV_FILE_CHOOSER_DEV_H_ | 73 #endif // PPAPI_CPP_DEV_FILE_CHOOSER_DEV_H_ |
| OLD | NEW |