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