From 8216a0e796895ec6e736aebbeacee9567ae85515 Mon Sep 17 00:00:00 2001 From: Patrick Scott Date: Mon, 22 Mar 2010 10:09:16 -0400 Subject: Add on-demand plugin support. The Settings object now has an on-demand flag for plugins (this was to avoid more edits to webkit code). If plugins are on-demand and a plugin is installed that can handle the content, insert a placeholder widget. If the user clicks on the placeholder, the plugin will be enabled. The widget currently does not clip the context correctly. It only clips based on the widget frame. This is due to a bug (already filed) where the scroll offset is producing bad clip rectangles. Requires a framework change. Bug: 2411524 Change-Id: If3931da8da2339a2385ae78b609c49fa069892ab --- WebCore/page/Settings.cpp | 3 +++ WebCore/page/Settings.h | 8 ++++++++ 2 files changed, 11 insertions(+) (limited to 'WebCore/page') diff --git a/WebCore/page/Settings.cpp b/WebCore/page/Settings.cpp index 7b5da91..c495a23 100644 --- a/WebCore/page/Settings.cpp +++ b/WebCore/page/Settings.cpp @@ -136,6 +136,9 @@ Settings::Settings(Page* page) , m_webGLEnabled(false) , m_geolocationEnabled(true) , m_loadDeferringEnabled(true) +#ifdef ANDROID_PLUGINS + , m_pluginsOnDemand(false) +#endif { // A Frame may not have been created yet, so we initialize the AtomicString // hash before trying to use it. diff --git a/WebCore/page/Settings.h b/WebCore/page/Settings.h index fc99ac8..652c13d 100644 --- a/WebCore/page/Settings.h +++ b/WebCore/page/Settings.h @@ -147,6 +147,11 @@ namespace WebCore { void setPluginsEnabled(bool); bool arePluginsEnabled() const { return m_arePluginsEnabled; } +#ifdef ANDROID_PLUGINS + void setPluginsOnDemand(bool onDemand) { m_pluginsOnDemand = onDemand; } + bool arePluginsOnDemand() const { return m_pluginsOnDemand; } +#endif + void setDatabasesEnabled(bool); bool databasesEnabled() const { return m_databasesEnabled; } @@ -458,6 +463,9 @@ namespace WebCore { bool m_webGLEnabled : 1; bool m_geolocationEnabled : 1; bool m_loadDeferringEnabled : 1; +#ifdef ANDROID_PLUGINS + bool m_pluginsOnDemand : 1; +#endif #if USE(SAFARI_THEME) static bool gShouldPaintNativeControls; -- cgit v1.1