summaryrefslogtreecommitdiffstats
path: root/WebCore/platform/android
diff options
context:
space:
mode:
Diffstat (limited to 'WebCore/platform/android')
-rw-r--r--WebCore/platform/android/GeolocationServiceAndroid.cpp10
-rw-r--r--WebCore/platform/android/GeolocationServiceBridge.cpp1
-rw-r--r--WebCore/platform/android/GeolocationServiceBridge.h2
-rw-r--r--WebCore/platform/android/PlatformBridge.h7
-rw-r--r--WebCore/platform/android/PlatformTouchEventAndroid.cpp45
-rw-r--r--WebCore/platform/android/PlatformTouchPointAndroid.cpp41
-rw-r--r--WebCore/platform/android/TemporaryLinkStubs.cpp2
7 files changed, 103 insertions, 5 deletions
diff --git a/WebCore/platform/android/GeolocationServiceAndroid.cpp b/WebCore/platform/android/GeolocationServiceAndroid.cpp
index 43a8f5f..3ffb9b9 100644
--- a/WebCore/platform/android/GeolocationServiceAndroid.cpp
+++ b/WebCore/platform/android/GeolocationServiceAndroid.cpp
@@ -28,6 +28,7 @@
#include "GeolocationServiceBridge.h"
#include "Geoposition.h"
+#include "PlatformBridge.h"
#include "PositionError.h"
#include "PositionOptions.h"
@@ -83,8 +84,13 @@ bool GeolocationServiceAndroid::startUpdating(PositionOptions* options)
if (options->enableHighAccuracy())
m_javaBridge->setEnableGps(true);
- if (!haveJavaBridge)
- m_javaBridge->start();
+ // We need only start the service when it's first created.
+ if (!haveJavaBridge) {
+ // If the browser is paused, don't start the service. It will be started
+ // when we get the call to resume.
+ if (!PlatformBridge::isWebViewPaused())
+ m_javaBridge->start();
+ }
return true;
}
diff --git a/WebCore/platform/android/GeolocationServiceBridge.cpp b/WebCore/platform/android/GeolocationServiceBridge.cpp
index c8ba85d..a30d2e6 100644
--- a/WebCore/platform/android/GeolocationServiceBridge.cpp
+++ b/WebCore/platform/android/GeolocationServiceBridge.cpp
@@ -31,7 +31,6 @@
#include "PositionError.h"
#include "WebViewCore.h"
#include <JNIHelp.h>
-#include <jni_utility.h>
namespace WebCore {
diff --git a/WebCore/platform/android/GeolocationServiceBridge.h b/WebCore/platform/android/GeolocationServiceBridge.h
index 0a83ba7..6cf9ead 100644
--- a/WebCore/platform/android/GeolocationServiceBridge.h
+++ b/WebCore/platform/android/GeolocationServiceBridge.h
@@ -26,7 +26,7 @@
#ifndef GeolocationServiceBridge_h
#define GeolocationServiceBridge_h
-#include <jni_utility.h>
+#include "JNIUtility.h"
#include <wtf/PassRefPtr.h>
namespace WebCore {
diff --git a/WebCore/platform/android/PlatformBridge.h b/WebCore/platform/android/PlatformBridge.h
index 9adb314..a73abab 100644
--- a/WebCore/platform/android/PlatformBridge.h
+++ b/WebCore/platform/android/PlatformBridge.h
@@ -50,6 +50,10 @@ public:
// KeyGenerator
static WTF::Vector<String> getSupportedKeyStrengthList();
static String getSignedPublicKeyAndChallengeString(unsigned index, const String& challenge, const KURL&);
+ // Cookies
+ static void setCookies(const KURL&, const String& value);
+ static String cookies(const KURL&);
+ static bool cookiesEnabled();
// These ids need to be in sync with the constants in BrowserFrame.java
enum rawResId {
NoDomain = 1,
@@ -67,6 +71,9 @@ public:
static void immediateRepaint(const FrameView* view);
#endif // USE(ACCELERATED_COMPOSITING)
+ // Whether the WebView is paused.
+ static bool isWebViewPaused();
};
+
}
#endif // PlatformBridge_h
diff --git a/WebCore/platform/android/PlatformTouchEventAndroid.cpp b/WebCore/platform/android/PlatformTouchEventAndroid.cpp
new file mode 100644
index 0000000..e4af8a3
--- /dev/null
+++ b/WebCore/platform/android/PlatformTouchEventAndroid.cpp
@@ -0,0 +1,45 @@
+/*
+ * Copyright 2010, The Android Open Source Project
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include "config.h"
+#include "PlatformTouchEvent.h"
+
+#if ENABLE(TOUCH_EVENTS)
+
+namespace WebCore {
+
+PlatformTouchEvent::PlatformTouchEvent(const IntPoint& absolutePagePos, TouchEventType type, PlatformTouchPoint::State state)
+ : m_type(type)
+ , m_ctrlKey(false)
+ , m_altKey(false)
+ , m_shiftKey(false)
+ , m_metaKey(false)
+{
+ m_touchPoints.append(PlatformTouchPoint(absolutePagePos, state));
+}
+
+}
+
+#endif
diff --git a/WebCore/platform/android/PlatformTouchPointAndroid.cpp b/WebCore/platform/android/PlatformTouchPointAndroid.cpp
new file mode 100644
index 0000000..d790855
--- /dev/null
+++ b/WebCore/platform/android/PlatformTouchPointAndroid.cpp
@@ -0,0 +1,41 @@
+/*
+ * Copyright 2010, The Android Open Source Project
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include "config.h"
+#include "PlatformTouchPoint.h"
+
+#if ENABLE(TOUCH_EVENTS)
+
+namespace WebCore {
+
+PlatformTouchPoint::PlatformTouchPoint(const IntPoint& absolutePagePos, State state)
+ : m_id(0)
+ , m_state(state)
+ , m_screenPos(absolutePagePos)
+ , m_pos(absolutePagePos) { }
+
+}
+
+#endif
diff --git a/WebCore/platform/android/TemporaryLinkStubs.cpp b/WebCore/platform/android/TemporaryLinkStubs.cpp
index fb9293c..9741ad5 100644
--- a/WebCore/platform/android/TemporaryLinkStubs.cpp
+++ b/WebCore/platform/android/TemporaryLinkStubs.cpp
@@ -81,10 +81,10 @@
#if USE(JSC)
#include "API/JSClassRef.h"
+#include "JNIUtilityPrivate.h"
#include "JavaScriptCallFrame.h"
#include "JavaScriptDebugServer.h"
#include "JavaScriptProfile.h"
-#include "jni_utility_private.h"
#endif
using namespace WebCore;