Mac: Fix compile errors due to revision 284 Chromium update.

git-svn-id: https://chromiumembedded.googlecode.com/svn/trunk@285 5089003a-bbd8-11dd-ad1f-f1f9622dbc98
This commit is contained in:
Marshall Greenblatt 2011-09-10 22:05:55 +00:00
parent d260f78cb2
commit 588a69ed9b
4 changed files with 15 additions and 8 deletions

View File

@ -171,7 +171,7 @@ bool ShouldDownload(const std::string& content_disposition,
return false; return false;
// Finally, check the plugin list. // Finally, check the plugin list.
bool allow_wildcard = true; bool allow_wildcard = false;
std::vector<webkit::WebPluginInfo> plugins; std::vector<webkit::WebPluginInfo> plugins;
webkit::npapi::PluginList::Singleton()->GetPluginInfoArray( webkit::npapi::PluginList::Singleton()->GetPluginInfoArray(
GURL(), type, allow_wildcard, NULL, &plugins, NULL); GURL(), type, allow_wildcard, NULL, &plugins, NULL);

View File

@ -65,7 +65,7 @@ FilePath GetFileNameFromDragData(const WebDropData& drop_data) {
if (file_name.empty()) { if (file_name.empty()) {
// Retrieve the name from the URL. // Retrieve the name from the URL.
string16 suggested_filename = string16 suggested_filename =
net::GetSuggestedFilename(drop_data.url, "", "", "", string16()); net::GetSuggestedFilename(drop_data.url, "", "", "", "", string16());
file_name = FilePathFromFilename(suggested_filename); file_name = FilePathFromFilename(suggested_filename);
} }

View File

@ -78,11 +78,18 @@ static BOOL IsSupportedFileURL(const GURL& url) {
return YES; return YES;
// Check whether there is a plugin that supports the mime type. (e.g. PDF) // Check whether there is a plugin that supports the mime type. (e.g. PDF)
webkit::npapi::PluginList* list = webkit::npapi::PluginList::Singleton(); bool allow_wildcard = false;
webkit::npapi::WebPluginInfo info; std::vector<webkit::WebPluginInfo> plugins;
if (list->PluginsLoaded() && webkit::npapi::PluginList::Singleton()->GetPluginInfoArray(
list->GetPluginInfo(GURL(), mime_type, false, &info, NULL)) { GURL(), mime_type, allow_wildcard, NULL, &plugins, NULL);
return webkit::npapi::IsPluginEnabled(info);
// If any associated plugins exist and are enabled don't allow the download.
if (!plugins.empty()) {
std::vector<webkit::WebPluginInfo>::const_iterator it = plugins.begin();
for (; it != plugins.end(); ++it) {
if (webkit::IsPluginEnabled(*it))
return YES;
}
} }
return NO; return NO;