From e887fb69bdcf88d5474c5f42fce159f661298a4f Mon Sep 17 00:00:00 2001 From: Kevin Sawicki Date: Tue, 22 Nov 2016 07:53:02 -0800 Subject: [PATCH] Export a setVisualZoomLevelLimits method --- atom/renderer/api/atom_api_web_frame.cc | 6 ++++-- atom/renderer/api/atom_api_web_frame.h | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/atom/renderer/api/atom_api_web_frame.cc b/atom/renderer/api/atom_api_web_frame.cc index 8cd74d08ad36..455073c14cd9 100644 --- a/atom/renderer/api/atom_api_web_frame.cc +++ b/atom/renderer/api/atom_api_web_frame.cc @@ -88,7 +88,7 @@ double WebFrame::GetZoomFactor() const { return blink::WebView::zoomLevelToZoomFactor(GetZoomLevel()); } -void WebFrame::SetZoomLevelLimits(double min_level, double max_level) { +void WebFrame::SetVisualZoomLevelLimits(double min_level, double max_level) { web_frame_->view()->setDefaultPageScaleLimits(min_level, max_level); } @@ -231,7 +231,9 @@ void WebFrame::BuildPrototype( .SetMethod("getZoomLevel", &WebFrame::GetZoomLevel) .SetMethod("setZoomFactor", &WebFrame::SetZoomFactor) .SetMethod("getZoomFactor", &WebFrame::GetZoomFactor) - .SetMethod("setZoomLevelLimits", &WebFrame::SetZoomLevelLimits) + .SetMethod("setZoomLevelLimits", &WebFrame::SetVisualZoomLevelLimits) + .SetMethod("setVisualZoomLevelLimits", + &WebFrame::SetVisualZoomLevelLimits) .SetMethod("setLayoutZoomLevelLimits", &WebFrame::SetLayoutZoomLevelLimits) .SetMethod("registerEmbedderCustomElement", diff --git a/atom/renderer/api/atom_api_web_frame.h b/atom/renderer/api/atom_api_web_frame.h index 37bb94ac8fae..4b5610cd149b 100644 --- a/atom/renderer/api/atom_api_web_frame.h +++ b/atom/renderer/api/atom_api_web_frame.h @@ -45,7 +45,7 @@ class WebFrame : public mate::Wrappable { double SetZoomFactor(double factor); double GetZoomFactor() const; - void SetZoomLevelLimits(double min_level, double max_level); + void SetVisualZoomLevelLimits(double min_level, double max_level); void SetLayoutZoomLevelLimits(double min_level, double max_level); v8::Local RegisterEmbedderCustomElement(