Take Android 4.2 as an example
1, Android 4.2 webviewclassic.java webview.java proxy class Span style= "font-family: ' Dejavu Serif ', Serif;" >
2, After the program runs browser load First webkit So.
Webviewcore.java, apk load only once after running .
Static {
//Load Libwebcore and libchromium_net during static initialization.
//This happens in the zygote process so they'll be shared read-only
//Across all app processes.
Try {
System. loadLibrary ("chromium_net");
System. loadLibrary ("WebCore");
} catch (Unsatisfiedlinkerror e) {
Log. e (logtag, "Unable to load native support libraries." );
}
3,loadlibary the corresponding JNI is initialized. will framwork layer webkit with C + + corresponding to the Layer Association .
the main processing in WebCoreJniOnLoad.cpp
Static Registrationmethod gwebcoreregmethods[] = {
{"Javabridge", Android::registerjavabridge},
{"Webframe", android::registerwebframe},
{"Webviewcore", Android::registerwebviewcore},
{"WebHistory", android::registerwebhistory},
{"Webicondatabase", android::registerwebicondatabase},
{"Websettingsclassic", android::registerwebsettings},
#if ENABLE (DATABASE)
{"WebStorage", android::registerwebstorage},
#endif
{"WebView", Android::registerwebview},
{"Viewstateserializer", Android::registerviewstateserializer},
{"Geolocationpermissions", android::registergeolocationpermissions},
{"Mockgeolocation", android::registermockgeolocation},
#if ENABLE (VIDEO)
{"Html5audio", Android::registermediaplayeraudio},
{"Html5videoviewproxy", Android::registermediaplayervideo},
#endif
{"Devicemotionandorientationmanager", Android:: Registerdevicemotionandorientationmanager},
{"Cookiemanager", Android::registercookiemanager},
{"CacheManager", Android::registercachemanager},
};
4. Create WebView:
Webview1 = (WebView) Findviewbyid (r.id. WebView1
after the row is called , The initial webkit,java will be and C + + the key class of the layer .
Android WebKit initialization process