mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-20 16:55:40 +00:00
Bug 1548475 - [Wayland] Disable Flash on Wayland backend, r=glandium
Reviewers: jmathies Reviewed By: jmathies Bug #: 1548475 Differential Revision: https://phabricator.services.mozilla.com/D30020 --HG-- extra : rebase_source : 8ad63589add41a921bec2834aa82bdabb039fcda
This commit is contained in:
parent
93059c799a
commit
85351067cf
@ -105,6 +105,10 @@
|
||||
# include "windows.h"
|
||||
# include "winbase.h"
|
||||
#endif
|
||||
#if (MOZ_WIDGET_GTK)
|
||||
# include <gdk/gdk.h>
|
||||
# include <gdk/gdkx.h>
|
||||
#endif
|
||||
|
||||
#include "npapi.h"
|
||||
|
||||
@ -358,9 +362,18 @@ nsPluginHost::nsPluginHost()
|
||||
mOverrideInternalTypes =
|
||||
Preferences::GetBool("plugin.override_internal_types", false);
|
||||
|
||||
mPluginsDisabled = Preferences::GetBool("plugin.disable", false);
|
||||
|
||||
Preferences::AddStrongObserver(this, "plugin.disable");
|
||||
bool waylandBackend = false;
|
||||
#if MOZ_WIDGET_GTK
|
||||
GdkDisplay* display = gdk_display_get_default();
|
||||
if (display) {
|
||||
waylandBackend = !GDK_IS_X11_DISPLAY(display);
|
||||
}
|
||||
#endif
|
||||
mPluginsDisabled =
|
||||
Preferences::GetBool("plugin.disable", false) || waylandBackend;
|
||||
if (!waylandBackend) {
|
||||
Preferences::AddStrongObserver(this, "plugin.disable");
|
||||
}
|
||||
|
||||
nsCOMPtr<nsIObserverService> obsService =
|
||||
mozilla::services::GetObserverService();
|
||||
|
Loading…
Reference in New Issue
Block a user