summaryrefslogtreecommitdiffstats
path: root/WebKit
diff options
context:
space:
mode:
Diffstat (limited to 'WebKit')
-rw-r--r--WebKit/android/jni/WebViewCore.cpp11
-rw-r--r--WebKit/android/jni/WebViewCore.h5
2 files changed, 16 insertions, 0 deletions
diff --git a/WebKit/android/jni/WebViewCore.cpp b/WebKit/android/jni/WebViewCore.cpp
index eafd91c..70e96cd 100644
--- a/WebKit/android/jni/WebViewCore.cpp
+++ b/WebKit/android/jni/WebViewCore.cpp
@@ -252,6 +252,7 @@ struct WebViewCore::JavaGlue {
jmethodID m_sendFindAgain;
jmethodID m_showRect;
jmethodID m_centerFitRect;
+ jmethodID m_setScrollbarModes;
AutoJObject object(JNIEnv* env) {
return getRealObject(env, m_obj);
}
@@ -342,6 +343,7 @@ WebViewCore::WebViewCore(JNIEnv* env, jobject javaWebViewCore, WebCore::Frame* m
m_javaGlue->m_sendFindAgain = GetJMethod(env, clazz, "sendFindAgain", "()V");
m_javaGlue->m_showRect = GetJMethod(env, clazz, "showRect", "(IIIIIIFFFF)V");
m_javaGlue->m_centerFitRect = GetJMethod(env, clazz, "centerFitRect", "(IIII)V");
+ m_javaGlue->m_setScrollbarModes = GetJMethod(env, clazz, "setScrollbarModes", "(II)V");
env->SetIntField(javaWebViewCore, gWebViewCoreFields.m_nativeClass, (jint)this);
@@ -2531,6 +2533,15 @@ void WebViewCore::centerFitRect(int x, int y, int width, int height)
checkException(env);
}
+
+void WebViewCore::setScrollbarModes(ScrollbarMode horizontalMode, ScrollbarMode verticalMode)
+{
+ JNIEnv* env = JSC::Bindings::getJNIEnv();
+ env->CallVoidMethod(m_javaGlue->object(env).get(), m_javaGlue->m_setScrollbarModes,
+ horizontalMode, verticalMode);
+ checkException(env);
+}
+
//----------------------------------------------------------------------
// Native JNI methods
//----------------------------------------------------------------------
diff --git a/WebKit/android/jni/WebViewCore.h b/WebKit/android/jni/WebViewCore.h
index 8c885e6..056dba1 100644
--- a/WebKit/android/jni/WebViewCore.h
+++ b/WebKit/android/jni/WebViewCore.h
@@ -249,6 +249,11 @@ namespace android {
void addMessageToConsole(const String& message, unsigned int lineNumber, const String& sourceID, int msgLevel);
+ /**
+ * Tell the Java side of the scrollbar mode
+ */
+ void setScrollbarModes(ScrollbarMode horizontalMode, ScrollbarMode verticalMode);
+
//
// Followings support calls from Java to native WebCore
//