Webkit create frame and loadurl
来源:互联网 发布:图像平滑算法matlab 编辑:程序博客网 时间:2024/06/08 13:05
1. Creating Frame
in android, it begins in "WebCoreFrameBridge.cpp",CreateFrame()
static void CreateFrame(JNIEnv* env, jobject obj, jobject javaview, jobject jAssetManager, jobject historyList)
it create many important classes for the browser, in time order:
Page WebFrame FrameLoaderClientAndroid FrameWebViewCore FrameView andWebFrameView
blue color ones are classes for android only. black are common class for webkit.
one most class is Frame:
below is the diagram for Frame and the class created by it.
FrameloaderClient(created in the same function as frame)
Frame
|--FrameLoader(init, raw pointer, create in the constructor list)
|--DocumentLoader (RefPtr, assign by function)
|--DocumentWriter(raw pointer, in the constructor list)
|--Document (passref begin, createDocument, return a document)
2. printf KURL
KURL is the class used in webkit to present url.
If we want to log the content of KURL, we should use code like this:
LOG(Loading," url %s",url.string().utf8().data());
Detail implement is below:
a KURL is defined in WebCore/Platform/KURL.h, it has a member function string().
b KURL.string(), return a class of String, which was defined in wtf/text/WTFString.h, it has a member function utf8()
c String.utf8() return a class of CString , which was defined in wtf/text/CString.h, it has a member function data().
d CString.data() return the type of char* , which can be printed directly.
3 LoadUrl
LoadProcess
FrameLoader->DocumentLoader->ResourceLoader->ResourceHandle(ResouceHanderInternal)->ResourceLoaderAndroid(WebUrlLoader)
->WebUrlLoaderClient->WebRequest(chromium's callback)
a.WebView.java
loadUrl
b.WebViewCore.java
loadUrl
c.BrowserFrame.java
loadUrl
nativeLoadUrl
d.WebCoreFrameBridge.cpp
LoadUrl
--pFrame->loader()->load(request, false);
e.FrameLoader
load(const ResourceRequest& request, bool lockHistory)
----FrameLoaderClient->createDocumentLoader()
load(DocumentLoader* newDocumentLoader)
----addExtraFieldsToMainResourceRequest
----loadWithDocumentLoader
callContinueLoadAfterNavigationPolicy()
continueLoadAfterWillSubmitForm()
f. DocumentLoader
startLoadingMainResource
g.MainResourceLoader
load
loadNow.
h.ResourceHandle
create
i.ResourceHandleAndroid.cpp
start
j.ResourceLoaderAndroid
start
k.WebUrlLoader
start
l.WebUrlLoaderClient
start.
......
to chromium stack.
also another imporant classes
ResourceRequest and ResourceResonse
browser
from click to tab
TitleBarXlarge->onClick
TitleBarBase->onAction
Controller->handleNewIntent
IntentHandler->onNewIntent
Controller->openTabAndShow
from loadurl to network (apache stack)
a.WebView.java
loadUrl
b.WebViewCore.java
loadUrl
c.BrowserFrame.java
loadUrl
nativeLoadUrl
d.WebCoreFrameBridge.cpp
LoadUrl
--pFrame->loader()->load(request, false);
e.FrameLoader
load(const ResourceRequest& request, bool lockHistory)
----FrameLoaderClient->createDocumentLoader()
load(DocumentLoader* newDocumentLoader)
----addExtraFieldsToMainResourceRequest
----loadWithDocumentLoader
callContinueLoadAfterNavigationPolicy()
continueLoadAfterWillSubmitForm()
f. DocumentLoader
startLoadingMainResource
g.MainResourceLoader
load
loadNow.
h.ResourceHandle
create
i.ResourceHandleAndroid.cpp
start
j.ResourceLoaderAndroid
// from now same as chromium stack.h. ResourceLoaderAndroid::start
i.WebCoreFrameBridge.startLoadingResource
j.BrowserFrame.java startLoadingResource
k.FrameLoader.java executeLoad
for local file
handleLocalFile.
- Webkit create frame and loadurl
- WebKit Frame对象分析
- Webkit之Frame
- webkit中 Frame对象分析
- webkit中 Frame对象分析
- webkit中 Frame对象分析
- webkit中 Frame对象分析
- webkit中 Frame对象分析
- WebKit 内核源码分析 (一) Frame
- webkit调试之二--初始化frame
- WebKit之Frame Tree建造过程
- WebKit and offlineCache
- frameset and frame , 连接
- Emacs Frame and buffer
- JavaScript -- Frame and window
- hash and frame (draft)
- Bridges and Frame Filtering
- Maxim Main Frame and Child Frame
- USB 的 NRZI 编码
- DB2 常用日期SQL语句
- U-Boot Stage1
- 量子物理史话 第四章 白云深处
- oracle内存结构
- Webkit create frame and loadurl
- 内部讲师培训笔记
- 汇编程序语言设计复习题整理
- 几种常用BroadcastReceiver
- web学习记录
- ArrayList和LinkedList的用法区别
- 建本地 repo server
- hdu 1276 士兵队列训练问题
- lua实现split的简易方法