Android Chromium的标题代码运行路径
在ContentViewCore.java里:
@CalledByNative
private void setTitle(String title) {
getContentViewClient().onUpdateTitle(title);
}
这里会调用:WebChromeClient.onReceivedTitle.
调用ContentViewCore.setTitle的C++文件是:
content_view_core_impl.cc
void ContentViewCoreImpl::SetTitle(const base::string16& title) {
Java_ContentViewCore_setTitle(env, obj.obj(), jtitle.obj());
}
在web_contents/web_contents_view_android.cc中
void WebContentsViewAndroid::SetPageTitle(const base::string16& title) {
if (content_view_core_)
content_view_core_->SetTitle(title);
}
然后调用:
WebContentsImpl::UpdateTitleForEntry() {
view_->SetPageTitle(final_title);
}
这里会接收msg:
RenderViewHostImpl::OnUpdateTitle
{}
void RenderViewImpl::UpdateTitle
{
Send(new ViewHostMsg_UpdateTitle(routing_id_, page_id_, shortened_title,
title_direction));
}
RenderViewImpl::didReceiveTitle{
UpdateTitle();
}
void FrameLoaderClientImpl::dispatchDidReceiveTitle(const String& title)
{
if (m_webFrame->client())
m_webFrame->client()->didReceiveTitle(m_webFrame, title, WebTextDirectionLeftToRight);
}
更多相关文章
- Android调用系统自带的文件管理器,打开指定路径
- Gallery中重复文件夹的问题
- Android Studio Gradle 缓存文件夹设置
- Android内核驱动开发中的Kconfig文件结构分析(图文)
- Android震动和播放资源文件中的声音文件
- Android文件管理器开发对各类文件的打开以及处理