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: flesh out the api for //extensions #21587

Merged
merged 5 commits into from Jan 13, 2020
Merged

feat: flesh out the api for //extensions #21587

merged 5 commits into from Jan 13, 2020

Conversation

@nornagon
Copy link
Member

nornagon commented Dec 19, 2019

Description of Change

This adds a few more APIs to the //extensions system, which is still behind the enable_electron_extensions build flag.

No release notes because none of these features are available in released versions of Electron yet.

Ref #19447

Checklist

Release Notes

Notes: none

@nornagon nornagon requested a review from jkleinsc Dec 19, 2019
@nornagon

This comment has been minimized.

Copy link
Member Author

nornagon commented Dec 19, 2019

(cc @samuelmaddock fyi!)

@samuelmaddock

This comment has been minimized.

Copy link
Member

samuelmaddock commented Dec 20, 2019

This looks to be going in a good direction to me! 👍

The only opinion I have is about the getLoadedExtensions method name. I could see there being some confusion around whether loaded extensions includes disabled extensions. getAllExtensions might be more clear, but I'm not strongly opinionated about this.

@nornagon

This comment has been minimized.

Copy link
Member Author

nornagon commented Dec 20, 2019

Makes sense to me! Also updated the sketch over in #19447.

@electron-cation electron-cation bot removed the new-pr 🌱 label Dec 20, 2019
Copy link
Contributor

jkleinsc left a comment

LGTM, but I think the API WG should weigh in on this. Also, would it make more sense to wait to add the unimplemented functions when they are actually implemented?

extension_system->RemoveExtension(extension_id);
}

void Session::EnableExtension(const std::string& extension_id) {

This comment has been minimized.

Copy link
@jkleinsc

jkleinsc Dec 30, 2019

Contributor

Should we wait until these are implemented to add them?

This comment has been minimized.

Copy link
@nornagon

nornagon Jan 9, 2020

Author Member

Sure, seems reasonable. I added them here because it was easy to do them all together but no particular need to keep them in this PR.

@nornagon

This comment has been minimized.

Copy link
Member Author

nornagon commented Jan 9, 2020

LGTM, but I think the API WG should weigh in on this.

FWIW, none of these functions are available in any released version of Electron, because these are behind a build flag that is off by default. I agree that we should do API review of the proposed APIs for extensions, over in #19447. I don't think API review should block this PR though as it does not change any exposed APIs of Electron.

@zcbenz
zcbenz approved these changes Jan 13, 2020
Copy link
Member

zcbenz left a comment

I agree this PR does not need API-wg's approval since there is no change to public APIs.

@@ -96,7 +96,10 @@ class Session : public gin_helper::TrackableObject<Session>,
#endif

#if BUILDFLAG(ENABLE_ELECTRON_EXTENSIONS)
void LoadChromeExtension(const base::FilePath extension_path);
v8::Local<v8::Promise> LoadExtension(const base::FilePath extension_path);

This comment has been minimized.

Copy link
@zcbenz

zcbenz Jan 13, 2020

Member

Should be const base::FilePath&.

@zcbenz zcbenz requested a review from jkleinsc Jan 13, 2020
@nornagon nornagon merged commit fa42b59 into master Jan 13, 2020
14 of 15 checks passed
14 of 15 checks passed
electron-woa-testing Build #20200113.23 had test failures
Details
Artifact Comparison No Changes
Details
Semantic Pull Request ready to be squashed
Details
WIP Ready for review
Details
appveyor: win-ia32-testing AppVeyor build succeeded
Details
appveyor: win-ia32-testing-pr AppVeyor build succeeded
Details
appveyor: win-woa-testing AppVeyor build succeeded
Details
appveyor: win-x64-testing AppVeyor build succeeded
Details
appveyor: win-x64-testing-pr AppVeyor build succeeded
Details
build-linux Workflow: build-linux
Details
build-mac Workflow: build-mac
Details
electron-arm-testing Build #20200113.46 succeeded
Details
electron-arm64-testing Build #20200113.46 succeeded
Details
lint Workflow: lint
Details
release-notes Release notes found
@release-clerk

This comment has been minimized.

Copy link

release-clerk bot commented Jan 13, 2020

No Release Notes

@nornagon nornagon deleted the extensions-api branch Jan 13, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants
You can’t perform that action at this time.