OSDN Git Service

Preparation for fixing bug 5065047: build libchromium as a shared lib
authorKristian Monsen <kristianm@google.com>
Mon, 25 Jul 2011 09:31:42 +0000 (10:31 +0100)
committerKristian Monsen <kristianm@google.com>
Mon, 25 Jul 2011 15:34:09 +0000 (16:34 +0100)
The chrome stack used to just declare the needed jni functions from
webkit and use them as they were static linked. This is not possible
when built as a shared library.

Change-Id: I1c81bc8c8e840dfda49e3941dc5a74d129030f43

Source/WebKit/android/WebCoreSupport/ChromiumIncludes.h
Source/WebKit/android/WebCoreSupport/ChromiumInit.cpp

index 9728aad..6402702 100644 (file)
@@ -46,6 +46,7 @@
 #endif
 
 #include <android/net/android_network_library_impl.h>
+#include <android/jni/jni_utils.h>
 #include <base/callback.h>
 #include <base/memory/ref_counted.h>
 #include <base/message_loop_proxy.h>
index 2bb4d3d..500975c 100644 (file)
@@ -27,6 +27,8 @@
 #include "ChromiumInit.h"
 
 #include "ChromiumIncludes.h"
+#include "JNIUtility.h"
+#include "jni.h"
 
 #include <cutils/log.h>
 #include <string>
@@ -68,6 +70,7 @@ void initChromium()
         networkChangeNotifier.reset(net::NetworkChangeNotifier::Create());
         net::HttpNetworkLayer::EnableSpdy("npn");
         initCalled = true;
+        jni::SetJavaVM(JSC::Bindings::getJavaVM());
     }
 }