Mac: Fix OS-X 10.5 compile errors due to issue #403 changes.

git-svn-id: https://chromiumembedded.googlecode.com/svn/trunk@359 5089003a-bbd8-11dd-ad1f-f1f9622dbc98
This commit is contained in:
Marshall Greenblatt 2011-11-04 19:52:14 +00:00
parent c451702e0c
commit 73699e71cd
1 changed files with 3 additions and 8 deletions

View File

@ -394,19 +394,14 @@ bool BrowserWebViewDelegate::ShowFileChooser(std::vector<FilePath>& file_names,
}
}
if (default_dir != nil) {
[dialog setDirectoryURL:[NSURL fileURLWithPath:default_dir
isDirectory:true]];
}
if (default_filename != nil)
[dialog setNameFieldStringValue:default_filename];
[dialog setAllowsOtherFileTypes:YES];
[dialog setAllowsMultipleSelection:multi_select];
[dialog setCanChooseFiles:YES];
[dialog setCanChooseDirectories:NO];
if ([dialog runModal] == NSFileHandlingPanelCancelButton)
NSInteger result = [dialog runModalForDirectory:default_dir
file:default_filename];
if (result == NSFileHandlingPanelCancelButton)
return false;
NSArray *urls = [dialog URLs];