Skip to content

feat: [extensions] implement a couple of tabs APIs - #21779

Merged
nornagon merged 10 commits into
masterfrom
extensions-executescript
Jan 15, 2020
Merged

nornagon merged 10 commits into
masterfrom
extensions-executescript

Conversation

@nornagon

@nornagon nornagon commented Jan 15, 2020 •

Copy link
Copy Markdown
Contributor

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 recently label Jan 15, 2020
@nornagon nornagon mentioned this pull request Jan 15, 2020
8 of 11 tasks
@nornagon nornagon changed the title feat: [extensions] implement tabs.executeScript feat: [extensions] implement a couple of tabs APIs Jan 15, 2020

@samuelmaddock samuelmaddock left a comment

Copy link
Copy Markdown
Member

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
Copy Markdown
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

@zcbenz zcbenz left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Looks good to me.

@jkleinsc jkleinsc left a comment

Copy link
Copy Markdown
Member

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
Copy Markdown
Contributor Author

win32 failure unrelated

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

release-clerk Bot commented Jan 15, 2020

Copy link
Copy Markdown

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 recently

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants