android4.4 WebView Chromium Display the chromium kernel structure of the Web page

Source: Internet
Author: User

android4.4 WebView Chromium is a single process, and all the components in the diagram are running in the browser process.
The chromium kernel structure associated with the display page in this diagram is described in the top-down order.
1. Awcontents->webcontentsimpl

The process of creating awcontnents is as follows:

Awcontents is the main implementation class of the WebView interface.
The awcontents of the native layer contains the class webcontents in the Chromium kernel browser component.
Webcontents is the entrance to the Chromium kernel browser component.
We look at the structure of the Java layer and the native layer of awcontents.

Contentviewcore:
The Java layer awcontents transfers WebView interface calls to the Java layer contentviewcore. Native Layer
The Contentviewcore contains the entry Webcontentsimpl for the browser component. Truly implement WebView functions
is the Webcontentsimpl.
Awcontentsclient:
The implementation class Webviewcontentsclientadapter of Awcontentsclient is contained in Webviewchromium,
Webviewchromium uses this class to receive awcontents callbacks. Webviewcontentsclientadapter
Encapsulates the webviewclient and Webchromeclient implemented by the application layer.
Awcontentsclientbridge:
Handles JS-related JNI communication for awcontentsclient.
Awwebcontentsdelegate:
is part of the Awcontentsclient interface and is used to receive callbacks from the Webcontentsimpl module.
Awwebcontentsdelegate transfer the specific implementation to the awcontentsclient.
The Webcontentsimpl creation process is as follows:

2.webcontentsimpl->renderer Host

Renderwidgethostdelegate:
Classes that are interested in the state of Renderwidgethost will implement this interface. Notification of status changes used to receive renderwidgethost.
Renderviewhostdelegate:
Classes that are interested in the state of Renderviewhost will implement this interface. Notification of status changes used to receive renderviewhost.
Renderviewhostmanager is responsible for creating and managing the renderviewhosts used in Webcontentsimpl.
The Renderviewhostmanager instance is created in the Webcontentsimpl constructor and acts as a renderwidgethostdelegate
and Renderviewhostdelegate instances to Renderviewhostmanager.
Renderviewhostmanager notifies Webcontentsimpl of the current renderwidgethost and renderviewhost through callbacks for both interfaces
Changes in state.
The Renderviewhostimpl process is created as follows.

The Renderviewhostimpl and the Renderviewimpl are one by one corresponding.

3.renderer Host->renderer

The 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 the creation process
Renderviewimpl::create () calls the constructor of Renderviewimpl to create
An instance of Renderviewimpl, and then calls Renderviewimpl::initialize:
Renderviewimpl::initialize () {
webwidget_ = Webview::create (this);
}
The instance creation of Renderwidget is triggered by a down function:
Renderviewimpl::createpopupmenu () {
renderwidget* widget =
Renderwidget::create (Routing_id_, Popup_type, screen_info_);
return Widget->webwidget ();
}
Renderwidget::create () only this one entrance.
Used to create different types of pop-up windows.

5. WebKit Glue->webkit

Structure diagram of Webviewimpl:


Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.