Skip to content

Commit

Permalink
Merge branch 'omp-jb52069' into 'master'
Browse files Browse the repository at this point in the history
[embedlite-components] Connect LoginManagerParent to listen related messages. Contributes to JB#52069

See merge request mer-core/embedlite-components!103
  • Loading branch information
rainemak committed Nov 19, 2020
2 parents cc8c848 + 1326568 commit fbe882c
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions jscomps/EmbedLiteGlobalHelper.js
Expand Up @@ -40,6 +40,20 @@ EmbedLiteGlobalHelper.prototype = {
// Init LoginManager
try {
Cc["@mozilla.org/login-manager;1"].getService(Ci.nsILoginManager);
var globalMM = Cc["@mozilla.org/globalmessagemanager;1"].getService(Ci.nsIMessageListenerManager);

// PLEASE KEEP THIS LIST IN SYNC WITH THE MOBILE LIST IN BrowserCLH.js AND WITH THE DESKTOP LIST IN nsBrowserGlue.js
// https://git.sailfishos.org/mer-core/gecko-dev/blob/f2e8f311/browser/components/nsBrowserGlue.js#L219
// https://git.sailfishos.org/mer-core/gecko-dev/blob/f2e8f311/mobile/android/components/BrowserCLH.js#L86
// SHA1: f2e8f3117a814098cef28ef1000139b836d33a08
globalMM.addMessageListener("RemoteLogins:findLogins", LoginManagerParent);
globalMM.addMessageListener("RemoteLogins:findRecipes", LoginManagerParent);
globalMM.addMessageListener("RemoteLogins:onFormSubmit", LoginManagerParent);
globalMM.addMessageListener("RemoteLogins:autoCompleteLogins", LoginManagerParent);
globalMM.addMessageListener("RemoteLogins:removeLogin", LoginManagerParent);
globalMM.addMessageListener("RemoteLogins:insecureLoginFormPresent", LoginManagerParent);
// PLEASE KEEP THIS LIST IN SYNC WITH THE MOBILE LIST IN BrowserCLH.js AND WITH THE DESKTOP LIST IN nsBrowserGlue.js

} catch (e) {
Logger.warn("E login manager:", e);
}
Expand Down

0 comments on commit fbe882c

Please sign in to comment.