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: [extensions] implement a couple of tabs APIs #21779

Merged
merged 10 commits into from Jan 15, 2020

Conversation

nornagon
Copy link
Member

@nornagon nornagon commented Jan 15, 2020

Description of Change

This (sort of) implements chrome.tabs.executeScript. It only works with non-negative tab IDs (i.e. the default of "active tab" will throw a validation error), and it makes no special effort to prevent extensions from accessing "tabs" they haven't requested permission to (though there does seem to be at least some protections in place in the code I've added, mostly copied from Chrome. I'm not sure if those are watertight though.)

Also implements chrome.tabs.sendMessage, which the Ember DevTools extension depends on.

This is enough to get the React and Ember DevTools extensions working when enable_electron_extensions = true.

Ref #19447

Checklist

Release Notes

Notes: none

@electron-cation electron-cation bot added the new-pr 🌱 PR opened in the last 24 hours label Jan 15, 2020
@nornagon nornagon changed the title feat: [extensions] implement tabs.executeScript feat: [extensions] implement a couple of tabs APIs Jan 15, 2020
Copy link
Member

@samuelmaddock samuelmaddock left a comment

Choose a reason for hiding this comment

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

lgtm! 👍

IDR_IME_SERVICE_MOJOM_JS);
source_map->RegisterSource("chromeos.ime.service",
IDR_IME_SERVICE_BINDINGS_JS);
#endif // defined(OS_CHROMEOS)
Copy link
Member

Choose a reason for hiding this comment

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

Could remove this section since it's related to Chrome OS

Copy link
Member

@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.

Looks good to me.

Copy link
Contributor

@jkleinsc jkleinsc left a comment

Choose a reason for hiding this comment

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

LGTM assuming lint issues are addressed.

@nornagon
Copy link
Member Author

win32 failure unrelated

@nornagon nornagon merged commit b9eb68c into master Jan 15, 2020
@release-clerk
Copy link

release-clerk bot commented Jan 15, 2020

No Release Notes

@nornagon nornagon deleted the extensions-executescript branch January 15, 2020 23:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
new-pr 🌱 PR opened in the last 24 hours
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants