Android4.4 webview chromium is a single process, and all components in the figure are running in the Browser process.
This figure shows the chromium kernel structure related to the display page in the top-down order.
1. AwContents-> WebContentsImpl
The AwContnents creation process is as follows:
AwContents is the main implementation class of the WebView interface.
AwContents at the native layer contains the class WebContents in the browser component of the chromium kernel.
WebContents is the entry to the chrome kernel browser component.
Let's look at the structure of AwContents's java layer and native layer.
ContentViewCZ tables? Http://www.bkjia.com/kf/ware/vc/ "target =" _ blank "class =" keylink "> export/atffTw9eqvdO4 + release + m8/rXEyOu/2ldlyknvbnrlbnrzsw1wbkgj1eb/release + release/release + m1xLvYtfehozxicj4KQXdXZWJDb250ZW50c0RlbGVnYXRlvau + fingerprint + pgltzybzcm9 "http://www.2cto.com/uploadfile/Collfiles/20140609/20140609091213136.jpg" alt = "\">
2. WebContentsImpl-> Renderer host
RenderWidgetHostDelegate:
Classes that are interested in the RenderWidgetHost status will implement this interface. Receives the status change notification of RenderWidgetHost.
RenderViewHostDelegate:
Classes that are interested in the RenderViewHost status will implement this interface. Receives the status change notification of RenderViewHost.
RenderViewHostManager is responsible for creating and managing RenderViewHosts used in WebContentsImpl.
The RenderViewHostManager instance is created in the WebContentsImpl constructor and uses itself as RenderWidgetHostDelegate
And RenderViewHostDelegate instances to RenderViewHostManager.
RenderViewHostManager notifies WebContentsImpl of the current RenderWidgetHost and RenderViewHost through the callback interfaces.
.
The RenderViewHostImpl creation process is as follows.
RenderViewHostImpl and RenderViewImpl correspond one to one.
3. renderer host-> renderer
RenderViewImpl is the core module in the renderer component.
Is the RenderViewImpl creation process triggered by the application layer.
4. renderer-> webkit glue
RenderViewImpl Structure Diagram
WebKit: WebView creation process
RenderViewImpl: Create () call the RenderViewImpl constructor to Create
RenderViewImpl instance, and then calls RenderViewImpl: Initialize:
RenderViewImpl: Initialize (){
Webwidget _ = WebView: create (this );
}
The RenderWidget instance is created by the following function:
RenderViewImpl: createPopupMenu (){
RenderWidget * widget =
RenderWidget: Create (routing_id _, popup_type, screen_info _);
Return widget-> webwidget ();
}
RenderWidget: Create () only has this entry.
Used to create different types of pop-up windows.
5. webkit glue-> WebKit
Structure of WebViewImpl: