Commit e0330693 authored by Jim Chen's avatar Jim Chen
Browse files

Bug 1367077 - 4. Remove LoginManagerParent.login; r=kmag

Mobile code now loads LoginManagerParent lazily, similar to
nsBrowserGlue on desktop, so we no longer need LoginManagerParent.login.

MozReview-Commit-ID: 8tnWnev344

--HG--
extra : rebase_source : f2e9d5e2be13156032d827ee67f960f96c87345c
parent cf0850fd
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -147,14 +147,14 @@ const listeners = {
    "Reader:ArticleGet": ["ReaderParent"],
    "Reader:FaviconRequest": ["ReaderParent"],
    "Reader:UpdateReaderButton": ["ReaderParent"],
    // PLEASE KEEP THIS LIST IN SYNC WITH THE LISTENERS ADDED IN LoginManagerParent.init
    // PLEASE KEEP THIS LIST IN SYNC WITH THE MOBILE LISTENERS IN BrowserCLH.js
    "RemoteLogins:findLogins": ["LoginManagerParent"],
    "RemoteLogins:findRecipes": ["LoginManagerParent"],
    "RemoteLogins:onFormSubmit": ["LoginManagerParent"],
    "RemoteLogins:autoCompleteLogins": ["LoginManagerParent"],
    "RemoteLogins:removeLogin": ["LoginManagerParent"],
    "RemoteLogins:insecureLoginFormPresent": ["LoginManagerParent"],
    // PLEASE KEEP THIS LIST IN SYNC WITH THE LISTENERS ADDED IN LoginManagerParent.init
    // PLEASE KEEP THIS LIST IN SYNC WITH THE MOBILE LISTENERS IN BrowserCLH.js
    "WCCR:registerProtocolHandler": ["Feeds"],
    "WCCR:registerContentHandler": ["Feeds"],
    "rtcpeer:CancelRequest": ["webrtcUI"],
+2 −18
Original line number Diff line number Diff line
@@ -66,24 +66,8 @@ var LoginManagerParent = {
    return LoginHelper.dedupeLogins(logins, ["username"], resolveBy, formOrigin);
  },

  // This should only be called on Android. Listeners are added in
  // nsBrowserGlue.js on desktop. Please make sure that the list of
  // listeners added here stays in sync with the listeners added in
  // nsBrowserGlue when you change either.
  init() {
    let mm = Cc["@mozilla.org/globalmessagemanager;1"]
               .getService(Ci.nsIMessageListenerManager);
    // PLEASE KEEP THIS LIST IN SYNC WITH THE LISTENERS ADDED IN nsBrowserGlue
    mm.addMessageListener("RemoteLogins:findLogins", this);
    mm.addMessageListener("RemoteLogins:findRecipes", this);
    mm.addMessageListener("RemoteLogins:onFormSubmit", this);
    mm.addMessageListener("RemoteLogins:autoCompleteLogins", this);
    mm.addMessageListener("RemoteLogins:removeLogin", this);
    mm.addMessageListener("RemoteLogins:insecureLoginFormPresent", this);
    // PLEASE KEEP THIS LIST IN SYNC WITH THE LISTENERS ADDED IN nsBrowserGlue
  },

  // Listeners are added in nsBrowserGlue.js
  // Listeners are added in nsBrowserGlue.js on desktop
  // and in BrowserCLH.js on mobile.
  receiveMessage(msg) {
    let data = msg.data;
    switch (msg.name) {