1.对外提供webview的api接口的是位于frameworks/base/core/java/android/webkit目录
2.桥接层(实现webview的api对实现的调用和调用下层)是位于frameworks/webview/chromium目录
3.实现层(构建被桥接代码使用的接口)位于
/external/chromium_org/android_webview/java/src/org/chromium/android_webview/目录
一、loadUrl跟踪:
Java层:
WebViewChromium->loadUrl(final String url, Map<String, String> additionalHttpHeaders)
AwContents->loadUrl(LoadUrlParams params)
ContentViewCore->loadUrl(LoadUrlParams params)
C++层:
content_view_core_impl.cc->ContentViewCoreImpl::LoadUrl(
JNIEnv* env, jobject obj, jstring url, jint load_url_type,
jint transition_type, jint ua_override_option, jstring extra_headers, jbyteArray post_data,
jstring base_url_for_data_url, jstring virtual_url_for_data_url, jboolean can_load_local_resources)
navigation_controller_impl.cc->NavigationControllerImpl::LoadURLWithParams(const LoadURLParams& params)
WebViewChromium->loadUrl(final String url, Map<String, String> additionalHttpHeaders)
AwContents->loadUrl(LoadUrlParams params)
ContentViewCore->loadUrl(LoadUrlParams params)
C++层:
content_view_core_impl.cc->ContentViewCoreImpl::LoadUrl(
JNIEnv* env, jobject obj, jstring url, jint load_url_type,
jint transition_type, jint ua_override_option, jstring extra_headers, jbyteArray post_data,
jstring base_url_for_data_url, jstring virtual_url_for_data_url, jboolean can_load_local_resources)
navigation_controller_impl.cc->NavigationControllerImpl::LoadURLWithParams(const LoadURLParams& params)