NPAPI has been removed, remove related option
This commit is contained in:
parent
0e92a3e333
commit
96771c7098
3 changed files with 11 additions and 9 deletions
|
@ -424,7 +424,6 @@ void NativeWindow::OverrideWebkitPrefs(content::WebPreferences* prefs) {
|
|||
return;
|
||||
|
||||
bool b;
|
||||
std::vector<base::FilePath> list;
|
||||
if (web_preferences_.Get("javascript", &b))
|
||||
prefs->javascript_enabled = b;
|
||||
if (web_preferences_.Get("images", &b))
|
||||
|
@ -446,14 +445,6 @@ void NativeWindow::OverrideWebkitPrefs(content::WebPreferences* prefs) {
|
|||
prefs->allow_displaying_insecure_content = b;
|
||||
if (web_preferences_.Get("allow-running-insecure-content", &b))
|
||||
prefs->allow_running_insecure_content = b;
|
||||
if (web_preferences_.Get("extra-plugin-dirs", &list)) {
|
||||
if (content::PluginService::GetInstance()->NPAPIPluginsSupported()) {
|
||||
for (size_t i = 0; i < list.size(); ++i)
|
||||
content::PluginService::GetInstance()->AddExtraPluginDir(list[i]);
|
||||
} else {
|
||||
LOG(WARNING) << "NPAPI plugins not supported on this platform";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void NativeWindow::NotifyWindowClosed() {
|
||||
|
|
|
@ -22,4 +22,11 @@ WebContentsPreferences::WebContentsPreferences(
|
|||
WebContentsPreferences::~WebContentsPreferences() {
|
||||
}
|
||||
|
||||
// static
|
||||
WebContentsPreferences* WebContentsPreferences::From(
|
||||
content::WebContents* web_contents) {
|
||||
return static_cast<WebContentsPreferences*>(
|
||||
web_contents->GetUserData(kWebPreferencesKey));
|
||||
}
|
||||
|
||||
} // namespace atom
|
||||
|
|
|
@ -10,9 +10,13 @@
|
|||
|
||||
namespace atom {
|
||||
|
||||
// Stores and applies the preferences of WebContents.
|
||||
class WebContentsPreferences
|
||||
: public content::WebContentsUserData<WebContentsPreferences> {
|
||||
public:
|
||||
// Get the preferences of |web_contents|.
|
||||
static WebContentsPreferences* From(content::WebContents* web_contents);
|
||||
|
||||
WebContentsPreferences(content::WebContents* web_contents,
|
||||
base::DictionaryValue&& web_preferences);
|
||||
~WebContentsPreferences() override;
|
||||
|
|
Loading…
Reference in a new issue