2013-12-13 03:25:26 -08: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 03:37:55 -08:00
|
|
|
Cu.import("resource://gre/modules/FxAccountsCommon.js");
|
2014-06-07 10:30:19 -07:00
|
|
|
Cu.import("resource://gre/modules/ContentRequestHelper.jsm");
|
2014-04-07 06:59:48 -07:00
|
|
|
|
2013-12-13 03:25:26 -08:00
|
|
|
function FxAccountsUIGlue() {
|
|
|
|
}
|
|
|
|
|
|
|
|
FxAccountsUIGlue.prototype = {
|
|
|
|
|
2014-06-07 10:30:19 -07:00
|
|
|
__proto__: ContentRequestHelper.prototype,
|
2013-12-13 03:25:26 -08:00
|
|
|
|
2014-02-19 02:47:11 -08:00
|
|
|
signInFlow: function() {
|
2014-06-07 10:30:19 -07:00
|
|
|
return this.contentRequest("mozFxAccountsRPContentEvent",
|
|
|
|
"mozFxAccountsUnsolChromeEvent",
|
|
|
|
"openFlow");
|
2014-02-19 02:47:11 -08:00
|
|
|
},
|
|
|
|
|
2014-04-29 14:47:59 -07:00
|
|
|
refreshAuthentication: function(aEmail) {
|
2014-06-07 10:30:19 -07:00
|
|
|
return this.contentRequest("mozFxAccountsRPContentEvent",
|
|
|
|
"mozFxAccountsUnsolChromeEvent",
|
|
|
|
"refreshAuthentication", {
|
2014-04-29 14:47:59 -07:00
|
|
|
email: aEmail
|
2014-02-19 02:47:11 -08:00
|
|
|
});
|
|
|
|
},
|
|
|
|
|
2013-12-13 03:25:26 -08:00
|
|
|
classID: Components.ID("{51875c14-91d7-4b8c-b65d-3549e101228c}"),
|
|
|
|
|
|
|
|
QueryInterface: XPCOMUtils.generateQI([Ci.nsIFxAccountsUIGlue])
|
|
|
|
};
|
|
|
|
|
|
|
|
this.NSGetFactory = XPCOMUtils.generateNSGetFactory([FxAccountsUIGlue]);
|