main/downloads
Classes
Section titled “Classes”Downloads
Section titled “Downloads”Defined in: app/src/main/downloads.ts:60
The list of downloads: the downloads of this session and those that the profile database keeps from before, a panel at the downloads button, and the button’s progress.
Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”new Downloads(
deps):Downloads
Defined in: app/src/main/downloads.ts:73
Parameters
Section titled “Parameters”The data service, the windows and the overlay.
Returns
Section titled “Returns”Methods
Section titled “Methods”forgetPrivate()
Section titled “forgetPrivate()”forgetPrivate():
void
Defined in: app/src/main/downloads.ts:166
Cancels the downloads of private windows and leaves them out of the list, after the last private window closed. Their finished files stay.
Returns
Section titled “Returns”void
open()
Section titled “open()”open(
window,anchor):void
Defined in: app/src/main/downloads.ts:180
Opens the panel of the list at the downloads button of a window.
Parameters
Section titled “Parameters”window
Section titled “window”The window.
anchor
Section titled “anchor”The button.
height
Section titled “height”number = coordinate
number = coordinate
number = coordinate
number = coordinate
Returns
Section titled “Returns”void
reveal()
Section titled “reveal()”reveal(
privateWindow):void
Defined in: app/src/main/downloads.ts:88
Shows the downloads button from now on, such as for its shortcut.
Parameters
Section titled “Parameters”privateWindow
Section titled “privateWindow”boolean
Whether the button of private windows shows, or of regular ones.
Returns
Section titled “Returns”void
summary()
Section titled “summary()”summary(
privateWindow): {active:number;progress:number|null; } |null
Defined in: app/src/main/downloads.ts:97
How the downloads button looks: null hides it until the browser downloads something.
Regular and private windows each count only their own downloads.
Parameters
Section titled “Parameters”privateWindow
Section titled “privateWindow”boolean
Whether the button is one of a private window.
Returns
Section titled “Returns”{ active: number; progress: number | null; } | null
track()
Section titled “track()”track(
item,privateWindow):void
Defined in: app/src/main/downloads.ts:116
Follows a download that started, whose file was chosen already.
Parameters
Section titled “Parameters”DownloadItem
Electron’s download.
privateWindow
Section titled “privateWindow”boolean
Whether a page of a private window started it.
Returns
Section titled “Returns”void
Interfaces
Section titled “Interfaces”DownloadsDependencies
Section titled “DownloadsDependencies”Defined in: app/src/main/downloads.ts:23
What the list of downloads needs from the composition root.
Properties
Section titled “Properties”
readonlydata:DataClient
Defined in: app/src/main/downloads.ts:24
logger
Section titled “logger”
readonlylogger:Logger
Defined in: app/src/main/downloads.ts:30
overlay
Section titled “overlay”
readonlyoverlay:OverlayOptions
Defined in: app/src/main/downloads.ts:28
router
Section titled “router”
readonlyrouter:IpcRouter
Defined in: app/src/main/downloads.ts:29
webSession
Section titled “webSession”
readonlywebSession: (privateWindow) =>Session
Defined in: app/src/main/downloads.ts:27
The session of web pages in regular or private windows, which downloads a file again.
Parameters
Section titled “Parameters”privateWindow
Section titled “privateWindow”boolean
Returns
Section titled “Returns”Session
windows
Section titled “windows”
readonlywindows:WindowManager
Defined in: app/src/main/downloads.ts:25