-
Notifications
You must be signed in to change notification settings - Fork 114
Add chrome.contextMenus.create and chrome.contextMenus.removeAll #82
Conversation
fix brave#4689 requires brave/muon#82 Auditors: @bridiver, @jonathansampson Test Plan: n/a
fix brave#4689 requires brave/muon#82 Auditors: @bridiver, @jonathansampson Test Plan: n/a
@bridiver pls review |
@@ -30,6 +30,7 @@ process.on('EXTENSION_READY_INTERNAL', (installInfo) => { | |||
} | |||
browserActions.setDefaultBrowserAction(installInfo.id, details) | |||
addBackgroundPageEvent(installInfo.id, 'chrome-browser-action-clicked') | |||
addBackgroundPageEvent(installInfo.id, 'chrome-context-menus-clicked') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this will only add the context menu events if the extension also has a browser action. Just moving it out of the if
should be fine
} | ||
}, | ||
removeAll: function (cb) { | ||
var responseId = ++id |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can we add the extension id to this as well? I know none of the others have it, but we should probably add for all of them because there is a chance of conflict now that we have more than one extension running at the same time
}, | ||
create: function (properties, cb) { | ||
console.warn('chrome.contentMenus.create is not supported yet') | ||
cb && cb() | ||
var responseId = ++id |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same as above
feedback addressed in 765646166e1f2e2fa50b7ea90b890b6c2efc0d0a |
Auditors: @bridiver, @jonathansampson