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

@ -264,17 +264,6 @@ void SetVisualZoomLevelLimits(v8::Local<v8::Value> window,
web_frame->View()->SetIgnoreViewportTagScaleLimits(true);
}
void SetLayoutZoomLevelLimits(v8::Local<v8::Value> window,
double min_level,
double max_level) {
content::RenderFrame* render_frame = GetRenderFrame(window);
mojom::ElectronBrowserPtr browser_ptr;
render_frame->GetRemoteInterfaces()->GetInterface(
mojo::MakeRequest(&browser_ptr));
browser_ptr->SetZoomLimits(min_level, max_level);
}
void AllowGuestViewElementDefinition(v8::Isolate* isolate,
v8::Local<v8::Value> window,
v8::Local<v8::Object> context,
@ -580,7 +569,6 @@ void Initialize(v8::Local<v8::Object> exports,
dict.SetMethod("setZoomFactor", &SetZoomFactor);
dict.SetMethod("getZoomFactor", &GetZoomFactor);
dict.SetMethod("setVisualZoomLevelLimits", &SetVisualZoomLevelLimits);
dict.SetMethod("setLayoutZoomLevelLimits", &SetLayoutZoomLevelLimits);
dict.SetMethod("allowGuestViewElementDefinition",
&AllowGuestViewElementDefinition);
dict.SetMethod("getWebFrameId", &GetWebFrameId);