This commit is contained in:
Cheng Zhao 2015-03-27 16:29:14 +08:00
parent 2505f8b8b2
commit 21a09d3ae8

View file

@ -459,15 +459,14 @@ void NativeWindow::OverrideWebkitPrefs(const GURL& url,
prefs->experimental_webgl_enabled = b; prefs->experimental_webgl_enabled = b;
if (web_preferences_.Get("webaudio", &b)) if (web_preferences_.Get("webaudio", &b))
prefs->webaudio_enabled = b; prefs->webaudio_enabled = b;
if (web_preferences_.Get("extra-plugin-dirs", &list)) {
auto isSupported = content::PluginService::GetInstance() if (content::PluginService::GetInstance()->NPAPIPluginsSupported()) {
->NPAPIPluginsSupported();
if (web_preferences_.Get("extra-plugin-dirs", &list) && isSupported) {
for (size_t i = 0; i < list.size(); ++i) for (size_t i = 0; i < list.size(); ++i)
content::PluginService::GetInstance()->AddExtraPluginDir(list[i]); content::PluginService::GetInstance()->AddExtraPluginDir(list[i]);
} else { } else {
LOG(WARNING) << "NPAPI plugins not supported on this platform"; LOG(WARNING) << "NPAPI plugins not supported on this platform";
} }
}
} }
void NativeWindow::NotifyWindowClosed() { void NativeWindow::NotifyWindowClosed() {