| Index: ppapi/examples/file_chooser/file_chooser.cc
|
| diff --git a/ppapi/examples/file_chooser/file_chooser.cc b/ppapi/examples/file_chooser/file_chooser.cc
|
| index 136ff31fb54beb7ae84cb19a2d3e1d1c84da070d..959e649f16fc2f95347f9bc65d4ff8f416e4d0a3 100644
|
| --- a/ppapi/examples/file_chooser/file_chooser.cc
|
| +++ b/ppapi/examples/file_chooser/file_chooser.cc
|
| @@ -49,19 +49,16 @@ class MyInstance : public pp::InstancePrivate {
|
| std::string accept_mime_types = (multi_select ? "" : "plain/text");
|
|
|
| chooser_ = pp::FileChooser_Dev(this, mode, accept_mime_types);
|
| - chooser_.Show(callback_factory_.NewCallback(
|
| + chooser_.Show(callback_factory_.NewCallbackWithOutput(
|
| &MyInstance::ShowSelectedFileNames));
|
| }
|
|
|
| - void ShowSelectedFileNames(int32_t result) {
|
| - if (!result != PP_OK)
|
| + void ShowSelectedFileNames(int32_t result,
|
| + const std::vector<pp::FileRef>& files) {
|
| + if (result != PP_OK)
|
| return;
|
| -
|
| - pp::FileRef file_ref = chooser_.GetNextChosenFile();
|
| - while (!file_ref.is_null()) {
|
| - Log(file_ref.GetName());
|
| - file_ref = chooser_.GetNextChosenFile();
|
| - }
|
| + for (size_t i = 0; i < files.size(); i++)
|
| + Log(files[i].GetName());
|
| }
|
|
|
| void RecreateConsole() {
|
|
|