This file contains support functions and objects for setupProgress.xul which downloads XPIs during first run. More...
Go to the source code of this file.
Functions | |
Components utils | import ("resource://app/jsmodules/StringUtils.jsm") |
function | init () |
Initialize the setupProgress dialog. More... | |
function | installNextXPI () |
Install the next XPI in the list of XPIs to install. More... | |
function | onExtensionDownloadProgress (aCurrentProgress, aMaxProgress) |
Listener function used to track progress of XPIs being downloaded. More... | |
function | onExtensionDownloadComplete () |
Listener function used to trigger installation of XPI when download is complete. More... | |
function | onExtensionDownloadError () |
Listener function used to recover from any errors that occur during the download of an XPI. More... | |
function | handleKeyDown (event) |
Handler function used to prevent bubbling of escape and enter key events while the progressSetup dialog is active. More... | |
function | downloadFile (url) |
Download an XPI file from a URL. Downloads an XPI file from a URL to a temporary file on disk. More... | |
function | cancelDownload () |
function | deleteLastDownloadedFile () |
Delete the last downloaded XPI file. More... | |
function | getTempFilename () |
Get a temporary file name. More... | |
function | generateUUID () |
Generate a UUID. More... | |
function | getRandomParameter () |
Generate a random URL parameter. More... | |
function | forceInstallXPI (localFilename) |
Force installation of an XPI. This method will install the XPI without asking the user's permission. Use "installXPI()" to involve the user in the install process. More... | |
Variables | |
var | label |
var | progressmeter |
var | cancelButton |
var | bundle |
var | pbundle |
var | n_ext |
var | cur_ext |
var | destFile |
var | afailure = false |
var | userCancel = false |
const | BUNDLE_ERROR_XPIINSTALLFAILED = -1 |
const | BUNDLE_ERROR_DOWNLOADFAILED = -2 |
const | VK_ENTER = 13 |
const | VK_ESCAPE = 27 |
const | NS_BINDING_ABORTED = 0x804B0002 |
var | _downloadListener |
Download listener object used to track progress of XPI downloads. More... | |
var | _filename |
var | _browser |
var | _file |
This file contains support functions and objects for setupProgress.xul which downloads XPIs during first run.
setupProgress.xul and setupProgress.js are responsible for downloading XPIs during first run. setupProgress.js contains all the support code required to download XPIs and install them.
Definition in file setupProgress.js.
function cancelDownload | ( | ) |
Definition at line 278 of file setupProgress.js.
function deleteLastDownloadedFile | ( | ) |
Delete the last downloaded XPI file.
Definition at line 305 of file setupProgress.js.
function downloadFile | ( | url | ) |
Download an XPI file from a URL. Downloads an XPI file from a URL to a temporary file on disk.
url | The url of the file to download. |
Definition at line 252 of file setupProgress.js.
function forceInstallXPI | ( | localFilename | ) |
Force installation of an XPI. This method will install the XPI without asking the user's permission. Use "installXPI()" to involve the user in the install process.
localFilename | The filename of the XPI to install. |
Definition at line 363 of file setupProgress.js.
function generateUUID | ( | ) |
Generate a UUID.
Definition at line 340 of file setupProgress.js.
function getRandomParameter | ( | ) |
Generate a random URL parameter.
Definition at line 351 of file setupProgress.js.
function getTempFilename | ( | ) |
Get a temporary file name.
Definition at line 319 of file setupProgress.js.
function handleKeyDown | ( | event | ) |
Handler function used to prevent bubbling of escape and enter key events while the progressSetup dialog is active.
Definition at line 163 of file setupProgress.js.
Components utils import | ( | "resource://app/jsmodules/StringUtils.jsm" | ) |
function init | ( | ) |
Initialize the setupProgress dialog.
Definition at line 62 of file setupProgress.js.
function installNextXPI | ( | ) |
Install the next XPI in the list of XPIs to install.
Definition at line 80 of file setupProgress.js.
function onExtensionDownloadComplete | ( | ) |
Listener function used to trigger installation of XPI when download is complete.
Definition at line 124 of file setupProgress.js.
function onExtensionDownloadError | ( | ) |
Listener function used to recover from any errors that occur during the download of an XPI.
Definition at line 147 of file setupProgress.js.
function onExtensionDownloadProgress | ( | aCurrentProgress, | |
aMaxProgress | |||
) |
Listener function used to track progress of XPIs being downloaded.
Definition at line 114 of file setupProgress.js.
var _browser |
Definition at line 242 of file setupProgress.js.
var _downloadListener |
Download listener object used to track progress of XPI downloads.
Definition at line 177 of file setupProgress.js.
var _file |
Definition at line 243 of file setupProgress.js.
var _filename |
Definition at line 241 of file setupProgress.js.
var afailure = false |
Definition at line 47 of file setupProgress.js.
var bundle |
Definition at line 43 of file setupProgress.js.
const BUNDLE_ERROR_DOWNLOADFAILED = -2 |
Definition at line 51 of file setupProgress.js.
const BUNDLE_ERROR_XPIINSTALLFAILED = -1 |
Definition at line 50 of file setupProgress.js.
var cancelButton |
Definition at line 42 of file setupProgress.js.
var cur_ext |
Definition at line 45 of file setupProgress.js.
var destFile |
Definition at line 46 of file setupProgress.js.
var label |
Definition at line 40 of file setupProgress.js.
var n_ext |
Definition at line 44 of file setupProgress.js.
const NS_BINDING_ABORTED = 0x804B0002 |
Definition at line 56 of file setupProgress.js.
var pbundle |
Definition at line 43 of file setupProgress.js.
var progressmeter |
Definition at line 41 of file setupProgress.js.
var userCancel = false |
Definition at line 48 of file setupProgress.js.
const VK_ENTER = 13 |
Definition at line 53 of file setupProgress.js.
const VK_ESCAPE = 27 |
Definition at line 54 of file setupProgress.js.