SetZoomLevel ends up in content\browser\host_zoom_map_impl.cc in
- Code: Select all
void HostZoomMap::SetZoomLevel(const WebContents* web_contents, double level) {
DCHECK_CURRENTLY_ON(BrowserThread::UI);
HostZoomMapImpl* host_zoom_map = static_cast<HostZoomMapImpl*>(
HostZoomMap::GetForWebContents(web_contents));
host_zoom_map->SetZoomLevelForWebContents(
*static_cast<const WebContentsImpl*>(web_contents), level);
}
which continues to HostZoomMapImpl::SetZoomLevelForWebContents => SetZoomLevelForHostInternal => SendZoomLevelChange, which seems to set the zoom for scheme/host.
Indeed this ends (finally) in WebContentsImpl::UpdateZoomIfNecessary, which operates on a single WebContentsImpl, but it's the SendZoomLevelChange which looks lie changing it for all WebContents having the same scheme/host. Most likely the popup shares the same scheme and host with the parent window.
Plugin hosts seems to be excepted, as well as those views with temporary zoom levels.
A (nasty) hack could be to call somehow from CEF into SetTemporaryZoomLevel for every view needed to operate zoom independently, so SendZoomLevelChange will skip it in the enumeration.
Which I won't recommend unless one needs to employ a quick hack.