diff options
author | Patrick Scott <phanna@android.com> | 2010-03-23 13:36:20 -0700 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2010-03-23 13:36:20 -0700 |
commit | 4aa28f1f5940594c38e46f06d720f07852b17112 (patch) | |
tree | 609bdadee80410507b6d601294ab90d1a23ab54e /WebCore | |
parent | e34f81fbe92e8ec4045613ae8e3e0e2f3b7360e3 (diff) | |
parent | 8216a0e796895ec6e736aebbeacee9567ae85515 (diff) | |
download | external_webkit-4aa28f1f5940594c38e46f06d720f07852b17112.zip external_webkit-4aa28f1f5940594c38e46f06d720f07852b17112.tar.gz external_webkit-4aa28f1f5940594c38e46f06d720f07852b17112.tar.bz2 |
Merge "Add on-demand plugin support."
Diffstat (limited to 'WebCore')
-rw-r--r-- | WebCore/page/Settings.cpp | 3 | ||||
-rw-r--r-- | WebCore/page/Settings.h | 8 | ||||
-rw-r--r-- | WebCore/platform/android/TemporaryLinkStubs.cpp | 5 | ||||
-rw-r--r-- | WebCore/platform/android/WidgetAndroid.cpp | 5 |
4 files changed, 18 insertions, 3 deletions
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; diff --git a/WebCore/platform/android/TemporaryLinkStubs.cpp b/WebCore/platform/android/TemporaryLinkStubs.cpp index 9741ad5..6dac5ef 100644 --- a/WebCore/platform/android/TemporaryLinkStubs.cpp +++ b/WebCore/platform/android/TemporaryLinkStubs.cpp @@ -67,6 +67,7 @@ #include "Pasteboard.h" #include "Path.h" #include "PluginInfoStore.h" +#include "PluginWidget.h" #include "ResourceError.h" #include "ResourceHandle.h" #include "ResourceLoader.h" @@ -144,6 +145,10 @@ void refreshPlugins(bool) #endif // !defined(ANDROID_PLUGINS) +// Needed to link with PluginWidget as a parent class of PluginToggleWidget. Mac +// defines this in plugins/mac/PluginWidgetMac.mm +void PluginWidget::invalidateRect(const IntRect&) {} + // This function tells the bridge that a resource was loaded from the cache and thus // the app may update progress with the amount of data loaded. void CheckCacheObjectStatus(DocLoader*, CachedResource*) diff --git a/WebCore/platform/android/WidgetAndroid.cpp b/WebCore/platform/android/WidgetAndroid.cpp index d122ef7..9ab0b2c 100644 --- a/WebCore/platform/android/WidgetAndroid.cpp +++ b/WebCore/platform/android/WidgetAndroid.cpp @@ -49,9 +49,8 @@ Widget::~Widget() IntRect Widget::frameRect() const { - // FIXME: use m_frame instead? if (!platformWidget()) - return IntRect(0, 0, 0, 0); + return m_frame; return platformWidget()->getBounds(); } @@ -95,7 +94,7 @@ void Widget::hide() void Widget::setFrameRect(const IntRect& rect) { - // FIXME: set m_frame instead? + m_frame = rect; // platformWidget() is 0 when called from Scrollbar if (!platformWidget()) return; |