Commit 74e0dceb authored by Yue Li's avatar Yue Li Committed by Commit Bot

Fix zoom issue for Assistant opt-in dialog

Bug: b/113699199
Test: Manual Test
Change-Id: If5915651e4a45c6ba0baf2e7c26dbe2a47f7befd
Reviewed-on: https://chromium-review.googlesource.com/1255627Reviewed-by: default avatarXiaohui Chen <xiaohuic@chromium.org>
Reviewed-by: default avatarXiyuan Xia <xiyuan@chromium.org>
Commit-Queue: Yue Li <updowndota@chromium.org>
Cr-Commit-Position: refs/heads/master@{#595954}
parent 5d112920
......@@ -17,6 +17,7 @@
#include "chrome/grit/browser_resources.h"
#include "components/arc/arc_prefs.h"
#include "components/prefs/pref_service.h"
#include "content/public/browser/host_zoom_map.h"
#include "content/public/browser/web_ui.h"
#include "content/public/browser/web_ui_data_source.h"
......@@ -50,6 +51,12 @@ AssistantOptInUI::AssistantOptInUI(content::WebUI* web_ui)
source->AddResourcePath("assistant_logo.png", IDR_ASSISTANT_LOGO_PNG);
source->SetDefaultResource(IDR_ASSISTANT_OPTIN_HTML);
content::WebUIDataSource::Add(Profile::FromWebUI(web_ui), source);
// Do not zoom for Assistant opt-in web contents.
content::HostZoomMap* zoom_map =
content::HostZoomMap::GetForWebContents(web_ui->GetWebContents());
DCHECK(zoom_map);
zoom_map->SetZoomLevelForHost(web_ui->GetWebContents()->GetURL().host(), 0);
}
AssistantOptInUI::~AssistantOptInUI() = default;
......
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