fix: deprecate setLayoutZoomLevelLimits (#21296)

This commit is contained in:
Jeremy Apthorp 2019-12-02 13:27:03 -08:00 committed by GitHub
parent c7cbc2e6b1
commit 9526c5584e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
14 changed files with 24 additions and 110 deletions

View file

@ -2316,15 +2316,6 @@ double WebContents::GetZoomFactor() const {
return blink::PageZoomLevelToZoomFactor(level);
}
void WebContents::SetZoomLimits(double min_zoom, double max_zoom) {
// Round the double to avoid returning incorrect minimum/maximum zoom
// percentages.
int minimum_percent = round(blink::PageZoomLevelToZoomFactor(min_zoom) * 100);
int maximum_percent = round(blink::PageZoomLevelToZoomFactor(max_zoom) * 100);
web_contents()->SetMinimumZoomPercent(minimum_percent);
web_contents()->SetMaximumZoomPercent(maximum_percent);
}
void WebContents::SetTemporaryZoomLevel(double level) {
zoom_controller_->SetTemporaryZoomLevel(level);
}