summaryrefslogtreecommitdiffstats
path: root/WebKit
diff options
context:
space:
mode:
authorSteve Block <steveblock@google.com>2010-10-08 15:24:49 +0100
committerSteve Block <steveblock@google.com>2010-10-08 15:45:11 +0100
commita670d9b37b9afce0ec7e53d72e375b6ac9ca04df (patch)
tree49b6eaadf75e653858924f071685456d28930d07 /WebKit
parent54b541647c8a934868c6c0f00665611569c9e4b8 (diff)
downloadexternal_webkit-a670d9b37b9afce0ec7e53d72e375b6ac9ca04df.zip
external_webkit-a670d9b37b9afce0ec7e53d72e375b6ac9ca04df.tar.gz
external_webkit-a670d9b37b9afce0ec7e53d72e375b6ac9ca04df.tar.bz2
Remove dependency of WebCore ScreenAndroid on platform API
Note that this change forks two WebCore files, but both files are already forked and are unlikely to be changed upstream by non-Android contributors. All changes to both files will be upstreamed at a later date. Bug: 2439218 Change-Id: I1e56ee12cec17df38a1404ab06c8897c22f2fd19
Diffstat (limited to 'WebKit')
-rw-r--r--WebKit/android/WebCoreSupport/PlatformBridge.cpp20
1 files changed, 19 insertions, 1 deletions
diff --git a/WebKit/android/WebCoreSupport/PlatformBridge.cpp b/WebKit/android/WebCoreSupport/PlatformBridge.cpp
index 945db00..d959cf3 100644
--- a/WebKit/android/WebCoreSupport/PlatformBridge.cpp
+++ b/WebKit/android/WebCoreSupport/PlatformBridge.cpp
@@ -37,6 +37,10 @@
#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>
@@ -48,7 +52,7 @@ WTF::Vector<String> PlatformBridge::getSupportedKeyStrengthList()
{
KeyGeneratorClient* client = JavaSharedClient::GetKeyGeneratorClient();
if (!client)
- return Vector<String>();
+ return WTF::Vector<String>();
return client->getSupportedKeyStrengthList();
}
@@ -142,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