欧美三区_成人在线免费观看视频_欧美极品少妇xxxxⅹ免费视频_a级毛片免费播放_鲁一鲁中文字幕久久_亚洲一级特黄

谷歌瀏覽器的源碼分析(4)

系統 2111 0

關于對話框,主要實現了讓用戶查看當前軟件的版本、軟件信息和檢查升級的功能。因此這個類主要繼續 ChromeViews::View 類、 ChromeViews::DialogDelegate GoogleUpdateStatusListener 。其中 ChromeViews::View 實現窗口的布局和顯示問題, ChromeViews::DialogDelegate 實現了事件響應,或者窗口某時是否可以顯示按鈕的問題, GoogleUpdateStatusListener 是用來實現接收更新程序狀態信息。

?

這個類的聲明如下:

class AboutChromeView : public ChromeViews::View,

??????????????????????? public ChromeViews::DialogDelegate,

??????????????????????? public GoogleUpdateStatusListener {

? public:

? explicit AboutChromeView(Profile* profile);

? virtual ~AboutChromeView();

?

? // Initialize the controls on the dialog.

? void Init();

?

? // Overridden from ChromeViews::View:

? virtual void GetPreferredSize(CSize *out);

? virtual void Layout();

? virtual void ViewHierarchyChanged(bool is_add,

????????????????????????????????? ?? ChromeViews::View* parent,

??????????????????????????????????? ChromeViews::View* child);

?

? // Overridden from ChromeViews::DialogDelegate:

? virtual int GetDialogButtons() const;

? virtual std::wstring GetDialogButtonLabel(DialogButton button) const;

? ? virtual bool IsDialogButtonEnabled(DialogButton button) const;

? virtual bool IsDialogButtonVisible(DialogButton button) const;

? virtual bool CanResize() const;

? virtual bool CanMaximize() const;

? virtual bool IsAlwaysOnTop() const;

? virtual bool HasAlwaysOnTopMenu() const;

? virtual bool IsModal() const;

? virtual std::wstring GetWindowTitle() const;

? virtual bool Accept();

? virtual ChromeViews::View* GetContentsView();

?

? // Overridden from GoogleUpdateStatusListener:

? virtual void OnReportResults(GoogleUpdateUpgradeResult result,

?????????????????????????????? GoogleUpdateErrorCode error_code,

?????????????????????????????? const std::wstring& version);

?

? private:

? // The visible state of the Check For Updates button.

? enum CheckButtonStatus {

? ?? CHECKBUTTON_HIDDEN = 0,

??? CHECKBUTTON_DISABLED,

??? CHECKBUTTON_ENABLED,

? };

?

? // Update the UI to show the status of the upgrade.

? void UpdateStatus(GoogleUpdateUpgradeResult result,

??????????????????? GoogleUpdateErrorCode error_code);

?

? Profile* profile_;

?

? // UI elements on the dialog.

? ChromeViews::ImageView* about_dlg_background_;

? ChromeViews::Label* about_title_label_;

? ChromeViews::TextField* version_label_;

? ChromeViews::TextField* main_text_label_;

? // UI elements we add to the parent view.

? scoped_ptr<ChromeViews::Throbber> throbber_;

? ChromeViews::ImageView success_indicator_;

? ChromeViews::ImageView update_available_indicator_;

? ChromeViews::ImageView timeout_indicator_;

? ChromeViews::Label update_label_;

?

? // Keeps track of the visible state of the Check For Updates button.

? CheckButtonStatus check_button_status_;

?

? // The class that communicates with Google Update to find out if an update is

? // available and asks it to start an upgrade.

? GoogleUpdate* google_updater_;

?

? // Our current version.

? std::wstring current_version_;

?

? // The version Google Update reports is available to us.

? std::wstring new_version_available_;

?

? DISALLOW_EVIL_CONSTRUCTORS(AboutChromeView);

};

?

通過關于對話框的分析,可以理解到 chrome 瀏覽器窗口基本組成,以及窗口繼承關系,還有事件的響應方式。前面三次分析,主要是入門的分析,也是了解這么一個大工程的一種手段。比如測試整個工程是否可以編譯,是否可以修改代碼等等。后面的分析會以瀏覽器輸入 HTTP 連接開始,直到打開網頁顯示為一個主線,做一個基本的分析。

?

谷歌瀏覽器的源碼分析(4)


更多文章、技術交流、商務合作、聯系博主

微信掃碼或搜索:z360901061

微信掃一掃加我為好友

QQ號聯系: 360901061

您的支持是博主寫作最大的動力,如果您喜歡我的文章,感覺我的文章對您有幫助,請用微信掃描下面二維碼支持博主2元、5元、10元、20元等您想捐的金額吧,狠狠點擊下面給點支持吧,站長非常感激您!手機微信長按不能支付解決辦法:請將微信支付二維碼保存到相冊,切換到微信,然后點擊微信右上角掃一掃功能,選擇支付二維碼完成支付。

【本文對您有幫助就好】

您的支持是博主寫作最大的動力,如果您喜歡我的文章,感覺我的文章對您有幫助,請用微信掃描上面二維碼支持博主2元、5元、10元、自定義金額等您想捐的金額吧,站長會非常 感謝您的哦!!!

發表我的評論
最新評論 總共0條評論
主站蜘蛛池模板: 亚洲精品国产成人 | 欧美另类视频在线 | 四色成人av永久网址 | 国产精品久久久久久久久久免费 | 亚洲精品在 | 91福利一区二区在线观看 | 国产精品国产午夜免费福利看 | 综合色在线 | 久久国产一区 | 亚洲自拍另类 | 久久久网站亚洲第一 | 精品欧美一区二区在线观看欧美熟 | 久久99精品久久久久久 | 亚洲国产系列久久精品99人人 | 亚洲资源在线 | 99精品视频在线在线视频观看 | 国产青青视频 | www.热 | 国产精品福利在线观看免费不卡 | 色精品一区二区三区 | 天天天天做夜夜夜夜 | 凹凸日日摸日日碰夜夜爽孕妇 | 国产成人激情视频 | 欧美成人精品欧美一级乱黄 | 蜜桃视频在线免费播放 | 国产成人精品一区二区三区电影 | 久久一本 | 猫咪人成免费网站在线观看 | 日韩精品不卡 | 99只有精品 | 久久婷婷在线 | 亚洲一二三| 欧美不卡一区二区三区在线观看 | 特级全黄 | 精品一区二区三区网站 | 天天色官网 | 免费看国产片在线观看 | 7777精品伊人久久久大香线蕉 | 日韩精品一区二区三区四区视频 | 成人a视频在线观看 | 久久精品久久久 |