diff options
author | The Android Open Source Project <initial-contribution@android.com> | 2009-03-09 11:52:12 -0700 |
---|---|---|
committer | The Android Open Source Project <initial-contribution@android.com> | 2009-03-09 11:52:12 -0700 |
commit | ba96c5ad9d140287cc378faec6bd9384836a00e6 (patch) | |
tree | 5c66f1f6ea8f513fca6d7ca6a924bb8315283e52 /WebCore | |
parent | 635860845790a19bf50bbc51ba8fb66a96dde068 (diff) | |
download | external_webkit-ba96c5ad9d140287cc378faec6bd9384836a00e6.zip external_webkit-ba96c5ad9d140287cc378faec6bd9384836a00e6.tar.gz external_webkit-ba96c5ad9d140287cc378faec6bd9384836a00e6.tar.bz2 |
auto import from //branches/cupcake/...@137197
Diffstat (limited to 'WebCore')
-rw-r--r-- | WebCore/plugins/android/PluginViewAndroid.cpp | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/WebCore/plugins/android/PluginViewAndroid.cpp b/WebCore/plugins/android/PluginViewAndroid.cpp index fc7bf86..09117ae 100644 --- a/WebCore/plugins/android/PluginViewAndroid.cpp +++ b/WebCore/plugins/android/PluginViewAndroid.cpp @@ -43,6 +43,7 @@ #include "KeyboardEvent.h" #include "MIMETypeRegistry.h" #include "MouseEvent.h" +#include "NetworkStateNotifier.h" #include "NotImplemented.h" #include "Page.h" #include "PlatformGraphicsContext.h" @@ -290,6 +291,11 @@ NPError PluginView::getValueStatic(NPNVariable variable, void* value) { // our interface query is valid with no NPP instance NPError error = NPERR_GENERIC_ERROR; + if ((value != NULL) && (variable == NPNVisOfflineBool)) { + bool* retValue = static_cast<bool*>(value); + *retValue = !networkStateNotifier().onLine(); + return NPERR_NO_ERROR; + } (void)anp_getInterface(variable, value, &error); return error; } @@ -431,6 +437,15 @@ NPError PluginView::getValue(NPNVariable variable, void* value) *retObject = android::WebViewCore::getWebViewCore(parent())->getWebViewJavaObject(); return NPERR_NO_ERROR; } + + case NPNVisOfflineBool: { + if (value == NULL) { + return NPERR_GENERIC_ERROR; + } + bool* retValue = static_cast<bool*>(value); + *retValue = !networkStateNotifier().onLine(); + return NPERR_NO_ERROR; + } case kSupportedDrawingModel_ANPGetValue: { uint32_t* bits = reinterpret_cast<uint32_t*>(value); @@ -549,4 +564,3 @@ void PluginView::setParentVisible(bool) { } } // namespace WebCore - |