Commit ba3ddbe2 authored by Denis Kuznetsov's avatar Denis Kuznetsov Committed by Commit Bot

OOBE: Extract embedded video to separate resource

This change improves OOBE startup time for 0.8 sec in debug mode (~2%).

Bug: 1058022
Change-Id: I1a6a8780afc4a0c2e28759beb6faeaadaef547ea
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2100807Reviewed-by: default avatarRoman Sorokin [CET] <rsorokin@chromium.org>
Reviewed-by: default avatardpapad <dpapad@chromium.org>
Commit-Queue: Denis Kuznetsov [CET] <antrim@chromium.org>
Cr-Commit-Position: refs/heads/master@{#749751}
parent 5d5c9c1e
...@@ -445,8 +445,14 @@ ...@@ -445,8 +445,14 @@
<include name="IDR_OS_SETTINGS_SEARCH_MOJOM_LITE_JS" file="${root_gen_dir}\chrome\browser\ui\webui\settings\chromeos\search\search.mojom-lite.js" compress="gzip" use_base_dir="false" type="BINDATA" /> <include name="IDR_OS_SETTINGS_SEARCH_MOJOM_LITE_JS" file="${root_gen_dir}\chrome\browser\ui\webui\settings\chromeos\search\search.mojom-lite.js" compress="gzip" use_base_dir="false" type="BINDATA" />
</if> </if>
<if expr="chromeos"> <if expr="chromeos">
<!-- OOBE / Login resources -->
<include name="IDR_ASSISTANT_LOGO_PNG" file="resources\chromeos\assistant_optin\assistant_logo.png" type="BINDATA" /> <include name="IDR_ASSISTANT_LOGO_PNG" file="resources\chromeos\assistant_optin\assistant_logo.png" type="BINDATA" />
<include name="IDR_SUPERVISION_ICON_PNG" file="resources\chromeos\supervision\supervision_icon.png" type="BINDATA" /> <include name="IDR_SUPERVISION_ICON_PNG" file="resources\chromeos\supervision\supervision_icon.png" type="BINDATA" />
<if expr="_google_chrome">
<!-- ARC Apps dowloading animation. -->
<include name="IDR_OOBE_ARC_APPS_DOWNLOADING_VIDEO" file="internal\resources\arc_support\videos\app_downloading.mp4" type="BINDATA" />
</if>
</if> </if>
<if expr="safe_browsing_mode == 1"> <if expr="safe_browsing_mode == 1">
<include name="IDR_RESET_PASSWORD_HTML" file="resources\reset_password\reset_password.html" type="BINDATA" compress="gzip" /> <include name="IDR_RESET_PASSWORD_HTML" file="resources\reset_password\reset_password.html" type="BINDATA" compress="gzip" />
......
...@@ -26,8 +26,7 @@ ...@@ -26,8 +26,7 @@
<div id="app-downloading-video-container" slot="footer"> <div id="app-downloading-video-container" slot="footer">
<if expr="chromeos and _google_chrome"> <if expr="chromeos and _google_chrome">
<video loop="loop" autoplay="autoplay" muted> <video loop="loop" autoplay="autoplay" muted>
<source <source src="chrome://oobe/res/arc_app_dowsnloading.mp4"
src="../../../internal/resources/arc_support/videos/app_downloading.mp4"
type="video/mp4"> type="video/mp4">
</video> </video>
</if> </if>
......
...@@ -141,6 +141,7 @@ constexpr char kRecommendAppListViewJSPath[] = "recommend_app_list_view.js"; ...@@ -141,6 +141,7 @@ constexpr char kRecommendAppListViewJSPath[] = "recommend_app_list_view.js";
constexpr char kLogo24PX1XSvgPath[] = "logo_24px-1x.svg"; constexpr char kLogo24PX1XSvgPath[] = "logo_24px-1x.svg";
constexpr char kLogo24PX2XSvgPath[] = "logo_24px-2x.svg"; constexpr char kLogo24PX2XSvgPath[] = "logo_24px-2x.svg";
constexpr char kSyncConsentIcons[] = "sync-consent-icons.html"; constexpr char kSyncConsentIcons[] = "sync-consent-icons.html";
constexpr char kArcAppDownloadingVideoPath[] = "res/arc_app_dowsnloading.mp4";
#endif #endif
// Adds various product logo resources. // Adds various product logo resources.
...@@ -179,6 +180,10 @@ void AddArcScreensResources(content::WebUIDataSource* source) { ...@@ -179,6 +180,10 @@ void AddArcScreensResources(content::WebUIDataSource* source) {
IDR_ARC_SUPPORT_RECOMMEND_APP_LIST_VIEW_JS); IDR_ARC_SUPPORT_RECOMMEND_APP_LIST_VIEW_JS);
source->AddResourcePath(kRecommendAppListViewHTMLPath, source->AddResourcePath(kRecommendAppListViewHTMLPath,
IDR_ARC_SUPPORT_RECOMMEND_APP_LIST_VIEW_HTML); IDR_ARC_SUPPORT_RECOMMEND_APP_LIST_VIEW_HTML);
#if BUILDFLAG(GOOGLE_CHROME_BRANDING)
source->AddResourcePath(kArcAppDownloadingVideoPath,
IDR_OOBE_ARC_APPS_DOWNLOADING_VIDEO);
#endif
} }
void AddAssistantScreensResources(content::WebUIDataSource* source) { void AddAssistantScreensResources(content::WebUIDataSource* source) {
......
...@@ -285,6 +285,9 @@ std::string WebUIDataSourceImpl::GetMimeType(const std::string& path) const { ...@@ -285,6 +285,9 @@ std::string WebUIDataSourceImpl::GetMimeType(const std::string& path) const {
if (base::EndsWith(file_path, ".png", base::CompareCase::INSENSITIVE_ASCII)) if (base::EndsWith(file_path, ".png", base::CompareCase::INSENSITIVE_ASCII))
return "image/png"; return "image/png";
if (base::EndsWith(file_path, ".mp4", base::CompareCase::INSENSITIVE_ASCII))
return "video/mp4";
return "text/html"; return "text/html";
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment