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:
parent
d260f78cb2
commit
588a69ed9b
|
@ -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);
|
||||||
|
|
|
@ -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);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -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;
|
||||||
|
|
Loading…
Reference in New Issue