您的位置:首页 > 大数据 > 人工智能

进入BrowsermainRunner::Run处理消息

2016-05-07 14:30 756 查看
1:在该函数中,进入BrowserMainLoop::RunMainMessageLoopParts()

2:在RunMainMessageLoopParts()进入MainMessageLoopRun()

3:MainMessageLoopRun在该实现投递了一个UI task,然后运行RunLoop对象

4:在RunLoop对象下运行Run函数,在Run下运行MessageLoop::RunHandler();

5:根据消息类型,会创建MessagePumpForIO 或者MessagePumpForUI

6:然后在MessagePumpForXX::DoRunLoop()中最终运行一个循环,等待处理消息事件

bool MessagePumpForUI::ProcessMessageHelper(const MSG& msg)

最终进入到该函数,这个函数会投递消息到窗口过程函数WindowImpl::WndProc

并且最终由HWNDMessageHandler处理

HWNDMessageHandler继承WindowImpl,而WindowImpl是实体窗口基类

HWNDMessageHandler是怎样创建的,看目录下的文章

MessagePumpForXX在\base\message_loop\message_pump_win.cc
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: