Access to file download dialog in Firefox

Is there any kind of API that can allow me to manipulate a file download dialog in Firefox?
(I want to access the one that appears when user does something, not initiate one myself).

What I want to do is to access this dialog from Selenium (and whether Selenium “privileged mode” is enough to access chrome interface is something I am not sure about as well).

Access to file download dialog in Firefox