2013-12-13 11:25:26 +00:00
|
|
|
/* This Source Code Form is subject to the terms of the Mozilla Public
|
|
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this file,
|
|
|
|
* You can obtain one at http://mozilla.org/MPL/2.0/. */
|
|
|
|
|
|
|
|
"use strict"
|
|
|
|
|
|
|
|
const { interfaces: Ci, utils: Cu } = Components;
|
|
|
|
|
2013-12-13 11:37:55 +00:00
|
|
|
Cu.import("resource://gre/modules/FxAccountsCommon.js");
|
2014-06-07 17:30:19 +00:00
|
|
|
Cu.import("resource://gre/modules/ContentRequestHelper.jsm");
|
2014-08-29 22:21:37 +00:00
|
|
|
Cu.import("resource://gre/modules/XPCOMUtils.jsm");
|
2014-04-07 13:59:48 +00:00
|
|
|
|
2013-12-13 11:25:26 +00:00
|
|
|
function FxAccountsUIGlue() {
|
|
|
|
}
|
|
|
|
|
|
|
|
FxAccountsUIGlue.prototype = {
|
|
|
|
|
2014-06-07 17:30:19 +00:00
|
|
|
__proto__: ContentRequestHelper.prototype,
|
2013-12-13 11:25:26 +00:00
|
|
|
|
2014-02-19 10:47:11 +00:00
|
|
|
signInFlow: function() {
|
2014-06-07 17:30:19 +00:00
|
|
|
return this.contentRequest("mozFxAccountsRPContentEvent",
|
|
|
|
"mozFxAccountsUnsolChromeEvent",
|
|
|
|
"openFlow");
|
2014-02-19 10:47:11 +00:00
|
|
|
},
|
|
|
|
|
2014-04-29 21:47:59 +00:00
|
|
|
refreshAuthentication: function(aEmail) {
|
2014-06-07 17:30:19 +00:00
|
|
|
return this.contentRequest("mozFxAccountsRPContentEvent",
|
|
|
|
"mozFxAccountsUnsolChromeEvent",
|
|
|
|
"refreshAuthentication", {
|
2014-04-29 21:47:59 +00:00
|
|
|
email: aEmail
|
2014-02-19 10:47:11 +00:00
|
|
|
});
|
|
|
|
},
|
|
|
|
|
2013-12-13 11:25:26 +00:00
|
|
|
classID: Components.ID("{51875c14-91d7-4b8c-b65d-3549e101228c}"),
|
|
|
|
|
|
|
|
QueryInterface: XPCOMUtils.generateQI([Ci.nsIFxAccountsUIGlue])
|
|
|
|
};
|
|
|
|
|
|
|
|
this.NSGetFactory = XPCOMUtils.generateNSGetFactory([FxAccountsUIGlue]);
|