summaryrefslogtreecommitdiffstats
path: root/webkit/glue/plugins/pepper_file_chooser.cc
diff options
context:
space:
mode:
Diffstat (limited to 'webkit/glue/plugins/pepper_file_chooser.cc')
-rw-r--r--webkit/glue/plugins/pepper_file_chooser.cc4
1 files changed, 4 insertions, 0 deletions
diff --git a/webkit/glue/plugins/pepper_file_chooser.cc b/webkit/glue/plugins/pepper_file_chooser.cc
index fd3ade1..2b54790 100644
--- a/webkit/glue/plugins/pepper_file_chooser.cc
+++ b/webkit/glue/plugins/pepper_file_chooser.cc
@@ -38,6 +38,10 @@ PP_Resource Create(PP_Instance instance_id,
if (!instance)
return 0;
+ if ((options->mode != PP_FILECHOOSERMODE_OPEN) &&
+ (options->mode != PP_FILECHOOSERMODE_OPENMULTIPLE))
+ return 0;
+
FileChooser* chooser = new FileChooser(instance, options);
return chooser->GetReference();
}