本文只描述Http网络请求相关的信息,Https、Spdy、file、ftp、websocket等的类型只提及在哪里出现关系分支。
代码层次图如下:
+----------------------------------------+ | WebView.java (SDK public API) | +----------------------------------------+ | Android & Chromium Wrapper | Java桥接和封装层 +----------------------------------------+ | Content Module (Navigation Control) | 核心层,加载流程中负责各种跳转 +----------------------------------------+ | blink public web API (WebView) | web api供外部操控内核 +----------------------------------------+ | WebCore | 原有WebCore的头尾被砍掉抽离形成blink +----------------------------------------+ | blink public platform API (Network) | platform api要求外部实现 +----------------------------------------+ | Content Module (I/O thread) | 对上层的实现,在IO线程中操作 +----------------------------------------+ | Network Stack | 网络库 +----------------------------------------+
下面是功能模块层次图(详细图中的黄色标签的索引):
+--------------------------------------------+ | Browser Application | 浏览器程序 +--------------------------------------------+ | package android.webkit | SDK API +--------------------------------------------+ | package com.android.webview.chromium | Android桥接层 +--------------------------------------------+ | package org.chromium.android_webview | Chromium封装层 +--------------------------------------------+ | package org.chromium.content.browser | Chromium Android平台代码 +--------------------------------------------+ | content Module Browser Side | Content模块Browser进程处理 +--------------------IPC---------------------+ | content Module Renderer Side | Content模块Renderer进程处理 +--------------------------------------------+ | blink public Web API | +--------------------------------------------+ | WebCore | +--------------------------------------------+ | blink public Platform API | +--------------------------------------------+ | content Module implementation of blink | content实现blink的接口 +--------------------IPC-------------------- + | content Module Loading Control | 加载流程控制 +--------------------------------------------+ | net Module public API | net库的对外接口层 +--------------------------------------------+ | Job Factory | 任务工厂(区分网络协议) +--------------------------------------------+ | Transaction & HttpCache | 事务与HttpCache +--------------------------------------------+ | | Session & Socket Pool | 会话与Socket Pool | stream |---------------------------| 流 | | DNS & HostCache | +--------------------------------------------+ | socket | +--------------------------------------------+
下面是详细的类间关系/层次图。看图提示:
简化的消息流如下:
下面是加载流程的xmind导出图,最好另存为到本地用看图软件看。看图提示:
图太大,分成两段,点击查看大图:
Android4.4系统浏览器Chromium实现的加载模块与流程,布布扣,bubuko.com
Android4.4系统浏览器Chromium实现的加载模块与流程
原文地址:http://blog.csdn.net/hursing/article/details/38727119