欧美三区_成人在线免费观看视频_欧美极品少妇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條評論
主站蜘蛛池模板: 色在线视频观看 | 欧美福利 | 国产精品亚洲视频 | 国产精品19禁在线观看2021 | 免费又粗又硬进去好爽A片视频 | www.国产| 成人精品网 | 久久精品一本到99热免费 | 亚洲免费视频一区 | 欧美黄色大片免费观看 | 懂色中文一区二区三区在线视频 | 国产色在线 | 亚洲www.| 中文字幕不卡在线观看 | 国产一级免费在线观看 | 精久视频| jizz视频 | 日韩高清不卡 | 多男操一女视频 | 99久久久国产精品免费99 | 五月婷婷综合激情网 | 久久国产成人福利播放 | 精品一区二区三区在线观看视频 | 久久伊人操 | 性视频亚洲 | 国产精品视频网站 | 天天做天天爱天天综合网 | 国产综合在线视频 | 日韩精品一区二区在线观看 | 成人不卡在线 | 天天操天天透 | 欧美两性人xxxx高清免费 | 免费日韩av | 日本一级在线 | 成人免费一区二区三区视频网站 | 国产精品蜜臂在线观看 | 精品亚洲成a人片在线观看 在线看片h站 | 欧美成人免费高清网站 | 免费九九视频 | 毛片一区二区三区四区 | 欧美一区二区三区免费观看视频 |