summaryrefslogtreecommitdiffstats
path: root/WebKit
diff options
context:
space:
mode:
Diffstat (limited to 'WebKit')
-rw-r--r--WebKit/android/WebCoreSupport/PlatformBridge.cpp32
1 files changed, 19 insertions, 13 deletions
diff --git a/WebKit/android/WebCoreSupport/PlatformBridge.cpp b/WebKit/android/WebCoreSupport/PlatformBridge.cpp
index abfb3bb..d959cf3 100644
--- a/WebKit/android/WebCoreSupport/PlatformBridge.cpp
+++ b/WebKit/android/WebCoreSupport/PlatformBridge.cpp
@@ -34,10 +34,13 @@
#include "KeyGeneratorClient.h"
#include "PluginView.h"
#include "Settings.h"
-#include "WebCoreFrameBridge.h"
#include "WebRequestContext.h"
#include "WebViewCore.h"
#include "npruntime.h"
+
+#include <surfaceflinger/SurfaceComposerClient.h>
+#include <ui/DisplayInfo.h>
+#include <ui/PixelFormat.h>
#include <wtf/android/AndroidThreading.h>
#include <wtf/MainThread.h>
@@ -49,7 +52,7 @@ WTF::Vector<String> PlatformBridge::getSupportedKeyStrengthList()
{
KeyGeneratorClient* client = JavaSharedClient::GetKeyGeneratorClient();
if (!client)
- return Vector<String>();
+ return WTF::Vector<String>();
return client->getSupportedKeyStrengthList();
}
@@ -132,17 +135,6 @@ bool PlatformBridge::isWebViewPaused(const WebCore::FrameView* frameView)
return webViewCore->isPaused();
}
-bool PlatformBridge::canScroll(const WebCore::FrameView* frameView)
-{
- // We want to ignore requests to scroll that were not initiated by the
- // user. An example of this is when text is inserted into a
- // textfield/area, which results in a scroll. We ignore this because
- // we know how to do this ourselves in the UI thread.
- // An example of it being initiated by the user is if the user clicks
- // an anchor element which simply scrolls the page.
- return android::WebFrame::getWebFrame(frameView->frame())->userInitiatedAction();
-}
-
bool PlatformBridge::popupsAllowed(NPP)
{
return false;
@@ -154,6 +146,20 @@ String PlatformBridge::resolveFilePathForContentUri(const String& contentUri)
return client->resolveFilePathForContentUri(contentUri);
}
+int PlatformBridge::PlatformBridge::screenDepth()
+{
+ android::DisplayInfo info;
+ android::SurfaceComposerClient::getDisplayInfo(android::DisplayID(0), &info);
+ return info.pixelFormatInfo.bitsPerPixel;
+}
+
+FloatRect PlatformBridge::screenRect()
+{
+ android::DisplayInfo info;
+ android::SurfaceComposerClient::getDisplayInfo(android::DisplayID(0), &info);
+ return FloatRect(0.0, 0.0, info.w, info.h);
+}
+
} // namespace WebCore