diff options
Diffstat (limited to 'WebKit/android/jni/WebCoreFrameBridge.cpp')
| -rw-r--r-- | WebKit/android/jni/WebCoreFrameBridge.cpp | 38 |
1 files changed, 22 insertions, 16 deletions
diff --git a/WebKit/android/jni/WebCoreFrameBridge.cpp b/WebKit/android/jni/WebCoreFrameBridge.cpp index 150c428..6f11487 100644 --- a/WebKit/android/jni/WebCoreFrameBridge.cpp +++ b/WebKit/android/jni/WebCoreFrameBridge.cpp @@ -25,7 +25,7 @@ #define LOG_TAG "webcoreglue" -#include <config.h> +#include "config.h" #include <wtf/Platform.h> #include <wtf/CurrentTime.h> @@ -66,8 +66,8 @@ #include "JSDOMWindow.h" #include <runtime/JSLock.h> #elif USE(V8) -#include "jni_npobject.h" -#include "jni_instance.h" +#include "JavaNPObjectV8.h" +#include "JavaInstanceV8.h" #endif // USE(JSC) #include "KURL.h" @@ -99,11 +99,11 @@ #include <runtime_object.h> #endif // USE(JSC) -#include <jni_utility.h> +#include <JNIUtility.h> #include "jni.h" #if USE(JSC) -#include "jni_instance.h" +#include "JavaInstanceJSC.h" #endif // USE(JSC) #include <JNIHelp.h> @@ -871,7 +871,13 @@ static void CreateFrame(JNIEnv* env, jobject obj, jobject javaview, jobject jAss WebCore::DragClient* dragC = new DragClientAndroid; InspectorClientAndroid* inspectorC = new InspectorClientAndroid; // Create a new page - WebCore::Page* page = new WebCore::Page(chromeC, contextMenuC, editorC, dragC, inspectorC, 0); + WebCore::Page* page = new WebCore::Page(chromeC, + contextMenuC, + editorC, + dragC, + inspectorC, + 0, // PluginHalterClient + 0); // GeolocationControllerClient // css files without explicit MIMETYPE is treated as generic text files in // the Java side. So we can't enforce CSS MIMETYPE. page->settings()->setEnforceCSSMIMETypeInStrictMode(false); @@ -1168,27 +1174,27 @@ private: { JNIEnv* env = getJNIEnv(); // JavaInstance creates a global ref to instance in its constructor. - env->DeleteGlobalRef(_instance->instance()); + env->DeleteGlobalRef(m_instance->instance()); // Set the object to a weak reference. - _instance->setInstance(env->NewWeakGlobalRef(instance)); + m_instance->setInstance(env->NewWeakGlobalRef(instance)); } ~WeakJavaInstance() { JNIEnv* env = getJNIEnv(); // Store the weak reference so we can delete it later. - jweak weak = _instance->instance(); + jweak weak = m_instance->instance(); // The JavaInstance destructor attempts to delete the global ref stored - // in _instance. Since we replaced it in our constructor with a weak + // in m_instance. Since we replaced it in our constructor with a weak // reference, restore the global ref here so the vm will not complain. - _instance->setInstance(env->NewGlobalRef( - getRealObject(env, _instance->instance()).get())); + m_instance->setInstance(env->NewGlobalRef( + getRealObject(env, m_instance->instance()).get())); // Delete the weak reference. env->DeleteWeakGlobalRef(weak); } virtual void virtualBegin() { - _weakRef = _instance->instance(); + _weakRef = m_instance->instance(); JNIEnv* env = getJNIEnv(); // This is odd. getRealObject returns an AutoJObject which is used to // cleanly create and delete a local reference. But, here we need to @@ -1197,7 +1203,7 @@ private: // and delete the local reference in virtualEnd(). _realObject = getRealObject(env, _weakRef).release(); // Point to the real object - _instance->setInstance(_realObject); + m_instance->setInstance(_realObject); // Call the base class method INHERITED::virtualBegin(); } @@ -1209,7 +1215,7 @@ private: // Get rid of the local reference to the real object. getJNIEnv()->DeleteLocalRef(_realObject); // Point back to the WeakReference. - _instance->setInstance(_weakRef); + m_instance->setInstance(_weakRef); } private: @@ -1518,7 +1524,7 @@ static void OrientationChanged(JNIEnv *env, jobject obj, int orientation) TimeCounterAuto counter(TimeCounter::NativeCallbackTimeCounter); #endif WebCore::Frame* pFrame = GET_NATIVE_FRAME(env, obj); - LOGE("Sending orientation: %d", orientation); + LOGV("Sending orientation: %d", orientation); pFrame->sendOrientationChangeEvent(orientation); } |
