Files
palemoon27/toolkit/modules/RemoteSecurityUI.jsm
roytam1 5f6df85cb7 align changes from rmottola/Arctic-Fox (rev e67e868c) to our tree Part 3: misc fixes including:
- Bug 1218882 - lz4.js should be usable outside of workers, r=Yoric. (360bb783)
- Bug 1046245 - enumerateDevices (harmless interface version) r=smaug, r=jesup (ce475127)
- Bug 1046245 - enumerateDevices returns label for pages w/active gUM or persistent permissions. r=jesup (ec780fb6)
- Bug 1110973 - Add a preference for enabling fake streams for tests, and use it in the Loop functional tests. r=smaug (580092e3)
- Bug 1046245 - enumerateDevices session-persisted hmac id. r=jesup (7d4eb087)
2020-01-12 15:07:13 +08:00

83 lines
2.4 KiB
JavaScript

// -*- indent-tabs-mode: nil; js-indent-level: 2 -*-
// 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/.
this.EXPORTED_SYMBOLS = ["RemoteSecurityUI"];
const Ci = Components.interfaces;
const Cc = Components.classes;
const Cu = Components.utils;
Cu.import("resource://gre/modules/XPCOMUtils.jsm");
function RemoteSecurityUI()
{
this._state = 0;
this._SSLStatus = null;
}
RemoteSecurityUI.prototype = {
QueryInterface: XPCOMUtils.generateQI([Ci.nsISSLStatusProvider, Ci.nsISecureBrowserUI]),
// nsISecureBrowserUI
get state() { return this._state; },
get tooltipText() { return ""; },
// nsISSLStatusProvider
get SSLStatus() { return this._SSLStatus; },
_update: function (state, status) {
let deserialized = null;
if (status) {
let helper = Cc["@mozilla.org/network/serialization-helper;1"]
.getService(Components.interfaces.nsISerializationHelper);
deserialized = helper.deserializeObject(status)
deserialized.QueryInterface(Ci.nsISSLStatus);
}
// We must check the Extended Validation (EV) state here, on the chrome
// process, because NSS is needed for that determination.
if (deserialized && deserialized.isExtendedValidation)
state |= Ci.nsIWebProgressListener.STATE_IDENTITY_EV_TOPLEVEL;
this._state = state;
this._SSLStatus = deserialized;
}
};
// -*- indent-tabs-mode: nil; js-indent-level: 2 -*-
// 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/.
this.EXPORTED_SYMBOLS = ["RemoteSecurityUI"];
const Ci = Components.interfaces;
const Cc = Components.classes;
const Cu = Components.utils;
Cu.import("resource://gre/modules/XPCOMUtils.jsm");
function RemoteSecurityUI()
{
this._SSLStatus = null;
this._state = 0;
}
RemoteSecurityUI.prototype = {
QueryInterface: XPCOMUtils.generateQI([Ci.nsISSLStatusProvider, Ci.nsISecureBrowserUI]),
// nsISSLStatusProvider
get SSLStatus() { return this._SSLStatus; },
// nsISecureBrowserUI
get state() { return this._state; },
get tooltipText() { return ""; },
_update: function (aStatus, aState) {
this._SSLStatus = aStatus;
this._state = aState;
}
};