Android Chromium的标题代码运行路径
2015-12-03 14:43
477 查看
在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);
}
@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新组件RecyclerView使用介绍和进阶使用,替用Gallery
- 【Android实战】RecyclerView实现水平可滚动gridview
- Android GC 那点事
- Android PullToRefresh (ListView GridView 下拉刷新) 使用详解
- Android设置Settings实现:PreferenceActivity
- 【Android实战】HorizontalScrollView实现可滑动GridView
- Android系统Service及其获取的方法 一览表
- Android NDK java和C\C++交互
- Android开发者网址导航
- Android Studio 环境搭建(windwos)
- android 拦截机制的分析
- 有关android NDK
- Android编程之canvas绘制各种图形(点,直线,弧,圆,椭圆,文字,矩形,多边形,曲线,圆角矩形)
- android-Color State List Resource
- 新浪微博Android SDK Java代码规范
- Android动画笔记
- 【资源汇总】Android应用解决方案全攻略
- 【风马一族_Android】代码英语之二 布局文件的Android各个参数
- Android动画学习笔记-Android Animation
- MTK Android software Tools工具的说明