1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/security/manager/pki/resources/content/createCertInfo.js Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,36 @@ 1.4 +/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- 1.5 + * 1.6 + * This Source Code Form is subject to the terms of the Mozilla Public 1.7 + * License, v. 2.0. If a copy of the MPL was not distributed with this 1.8 + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ 1.9 + 1.10 +var keygenThread; 1.11 + 1.12 +function onLoad() 1.13 +{ 1.14 + keygenThread = window.arguments[0].QueryInterface(Components.interfaces.nsIKeygenThread); 1.15 + 1.16 + if (!keygenThread) { 1.17 + window.close(); 1.18 + return; 1.19 + } 1.20 + 1.21 + setCursor("wait"); 1.22 + 1.23 + var obs = { 1.24 + observe : function keygenListenerObserve(subject, topic, data) { 1.25 + if (topic == "keygen-finished") 1.26 + window.close(); 1.27 + } 1.28 + }; 1.29 + 1.30 + keygenThread.startKeyGeneration(obs); 1.31 +} 1.32 + 1.33 +function onClose() 1.34 +{ 1.35 + setCursor("default"); 1.36 + 1.37 + var alreadyClosed = new Object(); 1.38 + keygenThread.userCanceled(alreadyClosed); 1.39 +}