当前位置:   article > 正文

WebKit in Android Framework_android framework inflating

android framework inflating

这部分内容我实在记不起来是我自己总结的还是从哪里看来的?看着凌乱的内容,感觉应该是当时随笔记录的理解,即使是copy来的,也算是当时工作中的一些总结

WebView extends AbsoluteLayout implements ViewTreeObserver.OnGlobalFocusChangeListener, ViewGroup.OnHierarchyChangeListener

CallbackProxy mCallbackProxy

WebViewCore mWebViewCore, many webview operation or public method using webviewcore to do something.

int mNativeClass,

mPrivateHandler, Handler for dispatching UI messages, in some cases, if it needs extra action before dispatch message, it will launch a new thread to do extra work then dispatching message. General handler to receive message coming from webkit thread. For UI relating, it will invoke callbackproxy to do

final Handler mPrivateHandler = new PrivateHandler(); Handler for dispatching UI messages.

class CallbackProxy extends Handler, a proxy class for handling WebCore -> UI thread messaging. All the callback functions are called from the WebCore thread and messages are posted to the UI thread for the actual client callback.
This class is created in the UI thread so its handler and any private classes that extend Handler will operate in the UI thread.
class WebViewCore
WebViewCore always executes in the same thread as the native webkit.
private final CallbackProxy mCallbackProxy; Proxy for handling callbacks from native code
BrowserFrame mBrowserFrame; The BrowserFrame is an interface to the native Frame component.
In it, Thread t = new Thread(new WebCoreThread()); will be created
mBrowserFrame = new BrowserFrame
mEventHub. It will create a handler to process all webviewcore invoke
In webviewcore, it will be mWebView.mPrivateHandler.sendMessage.XX
In webview, it will be like mWebViewCore.sendMessage(EventHub.XXX
class BrowserFrame extends Handler,

UI BrowserFrame.java->nativeLoadUrl == WebCoreFrameBridge.cpp->LoadUrl

CORE BrowserFrame.java-> loadStarted
CallbackProxy.java->onPageStarted

UI CallbackProxy.java -> PAGE_STARTED
WebView.java->onPageStarted

CORE WebViewCore.removeMessages
WebViewCore$EventHub.removeMessages

 BrowserFrame.setProgress
 CallbackProxy.java->onProgressChanged
  • 1
  • 2
声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/weixin_40725706/article/detail/1003690
推荐阅读
相关标签
  

闽ICP备14008679号