Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: make zoomLevel/zoomFactor sync #16410

Merged
merged 2 commits into from Jan 21, 2019
Merged

Conversation

codebytere
Copy link
Member

@codebytere codebytere commented Jan 15, 2019

Description of Change

Convert webContents getZoomLevel and getZoomFactor to be sync methods.

cc @ckerr

Checklist

Release Notes

Notes: Converted zoomLevel() and zoomFactor() for webContents and <webview> to return a promise instead taking a callback.

@codebytere codebytere requested a review from a team January 15, 2019 19:13
@codebytere codebytere requested a review from a team January 15, 2019 19:20
@codebytere codebytere changed the title [wip] feat: promisify zoomLevel and zoomFactor feat: promisify zoomLevel and zoomFactor Jan 16, 2019
Copy link
Member

@deepak1556 deepak1556 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

GetZoomFactor and GetZoomLevel were originally implemented using webFrame apis, hence they had to rely on ipc and had an async api signature. It then got refactored to rely on the browser side ZoomController. These apis no longer need to be async, its better to deprecate the current signature in favor of that instead of promisification.

@codebytere codebytere changed the title feat: promisify zoomLevel and zoomFactor feat: make zoomLevel/zoomFactor sync Jan 17, 2019
Copy link
Member

@deepak1556 deepak1556 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there a plan to handle the deprecations of the async signatures ?

atom/browser/api/atom_api_web_contents.cc Outdated Show resolved Hide resolved
@codebytere
Copy link
Member Author

Must be merged with: electron/typescript-definitions#119

@codebytere codebytere merged commit 3ca87d2 into master Jan 21, 2019
@release-clerk
Copy link

release-clerk bot commented Jan 21, 2019

Release Notes Persisted

Converted zoomLevel() and zoomFactor() for webContents and <webview> to return a promise instead taking a callback.

@codebytere codebytere deleted the promisify-getzoomlevel branch January 21, 2019 07:40
akisctx pushed a commit to akisctx/electron that referenced this pull request Jan 22, 2019
* feat: make zoomLevel/zoomFactor sync

* update ts defs dep
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants