8000 chore: Move webFrame scheme privilege methods to main process by nitsakh · Pull Request #16416 · electron/electron · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

chore: Move webFrame scheme privilege methods to main process #16416

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

Merged
merged 12 commits into from
Jan 29, 2019

Conversation

nitsakh
Copy link
Contributor
@nitsakh nitsakh commented Jan 16, 2019

Description of Change

This PR updates the custom scheme registration APIs and moves them to the browser process.
#15767 was a precursor to the current PR.
Custom schemes have to be registered from the main process and before app ready.

Checklist

Release Notes

Notes: Moved webFrame custom scheme APIs to browser process under protocol

Copy link
Contributor
@zcbenz zcbenz left a comment

Choose a reason for hiding this comment

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

👍

@zcbenz
Copy link
Contributor
zcbenz commented Jan 22, 2019

Can you also document this in docs/api/breaking-changes.md?

And do we have deprecation warnings in 4.x?

@codebytere
Copy link
Member

@nitsakh once the conflict is fixed and the change added to the api contract i think this is good to go 👍

@nitsakh nitsakh force-pushed the webframe-scheme-api branch from 5fd7239 to 1caff08 Compare January 29, 2019 01:18
@zcbenz zcbenz merged commit 940c4c0 into master Jan 29, 2019
@release-clerk
Copy link
release-clerk bot commented Jan 29, 2019

Release Notes Persisted

Moved webFrame custom scheme APIs to browser process under protocol

@trop
Copy link
Contributor
trop bot commented Jan 29, 2019

I have automatically backported this PR to "5-0-x", please check out #16585

@nitsakh nitsakh deleted the webframe-scheme-api branch January 29, 2019 17:58
@miniak
Copy link
Contributor
miniak commented Jan 29, 2019

@nitsakh, @zcbenz this PR broke the electron.d.ts generation

Error: Ruh roh, "Options" is already declared
    at Object.keys.sort.forEach (/Users/miburda/Development/github/electron-gn/src/electron/node_modules/electron-typescript-definitions/lib/dynamic-param-interfaces.js:83:17)
    at Array.forEach (<anonymous>)
    at Object.flushParamInterfaces (/Users/miburda/Development/github/electron-gn/src/electron/node_modules/electron-typescript-definitions/lib/dynamic-param-interfaces.js:70:142)
    at module.exports (/Users/miburda/Development/github/electron-gn/src/electron/node_modules/electron-typescript-definitions/index.js:69:19)
    at apiPromise.then.then.API (/Users/miburda/Development/github/electron-gn/src/electron/node_modules/electron-typescript-definitions/cli.js:56:18)
    at process._tickCallback (internal/process/next_tick.js:43:7)
    at Function.Module.runMain (internal/modules/cjs/loader.js:777:11)
    at executeUserCode (internal/bootstrap/node.js:342:17)
    at startExecution (internal/bootstrap/node.js:276:5)
    at startup (internal/bootstrap/node.js:227:5)

@nitsakh
Copy link
Contributor Author
nitsakh commented Jan 29, 2019

Thanks @miniak . Let me look at it now and I'll send a PR with the fix.

@miniak
Copy link
Contributor
miniak commented Jan 29, 2019

There are even more issues

test/main.ts(830,12): error TS2339: Property 'registerStandardSchemes' does not exist on type 'Protocol'.

test/main.ts(831,12): error TS2339: Property 'registerServiceWorkerSchemes' does not exist on type 'Protocol'.
test/renderer.ts(73,10): error TS2339: Property 'registerURLSchemeAsBypassingCSP' does not exist on type 'WebFrame'.
test/renderer.ts(74,10): error TS2339: Property 'registerURLSchemeAsPrivileged' does not exist on type 'WebFrame'.
test/renderer.ts(75,10): error TS2339: Property 'registerURLSchemeAsPrivileged' does not exist on type 'WebFrame'.

@miniak
Copy link
Contributor
8000 miniak commented Jan 29, 2019

@nitsakh, @zcbenz personally, I would recommend reverting this PR until the issues are resolved and applying it again when fixed unless it can be fixed promptly.

nitsakh added a commit that referenced this pull request Jan 30, 2019
* chore: deprecate webFrame.registerURLSchemeAsPrivileged

* Add register schemes protocol api

* update branch to enable browser process API

* Revert deprecation changes

* Fetch API support

* Updated api to take an array, still working on tests

* Update tests

* Remove web frame API

* Minor changes

* update scheme registrations on browser and renderer process

* fix: enable ses.getBlobData spec

* Update breaking changes doc
MarshallOfSound pushed a commit that referenced this pull request Jan 30, 2019
* feat: move webFrame scheme privilege methods to main process (#16416)

* chore: deprecate webFrame.registerURLSchemeAsPrivileged

* Add register schemes protocol api

* update branch to enable browser process API

* Revert deprecation changes

* Fetch API support

* Updated api to take an array, still working on tests

* Update tests

* Remove web frame API

* Minor changes

* update scheme registrations on browser and renderer process

* fix: enable ses.getBlobData spec

* Update breaking changes doc

* fix: update docs for protocol API (#16601)

* fix: update docs for protocol API

* upddate source for new attribute name

* update electron-typescript-definitions package
deepak1556 added a commit to microsoft/vscode that referenced this pull request Jun 14, 2019
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.

5 participants
0