mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-12-03 10:33:33 +00:00
1a8239407b
This adds support for download progress reporting via the XApp method currently used in the Cinnamon desktop, by establishing a new X11 window property to be supported/read by the window manager. See https://github.com/linuxmint/xapps/blob/master/libxapp/xapp-gtk-window.c, as well as https://github.com/linuxmint/muffin/commit/39045da0ea06f for more details. The property-setting code lives in nsWindow - it's a small and stable enough chunk that it made more sense to do this than actually depend on another external library. As nsWindow is already using x11 calls, this seemed the safest place for it, without affecting the build. The TaskbarProgress instance is initialized via the DownloadsTaskbar js module, and is handed a pointer to the current main window to call SetProgress on. Most of the javascript side of this is in line with how the other platforms are handled. Without a supporting window manager/desktop environment (currently just Cinnamon/Muffin 3.6,) the simplest way to observe working behavior is by calling 'xprop -spy' on the browser window being testing and watching for updates during a download. --HG-- extra : rebase_source : 0606f6c87116204ec290c19276072d0c1c35691e
23 lines
636 B
Plaintext
23 lines
636 B
Plaintext
/* 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/. */
|
|
|
|
#include "nsITaskbarProgress.idl"
|
|
|
|
interface mozIDOMWindowProxy;
|
|
|
|
/**
|
|
* Allow the TaskbarProgress instance to set a new target window.
|
|
*/
|
|
|
|
[scriptable, uuid(39f6fc5a-2386-4bc6-941c-d7479253bc3f)]
|
|
interface nsIGtkTaskbarProgress : nsITaskbarProgress
|
|
{
|
|
/**
|
|
* Sets the window that is considered primary for purposes of
|
|
* setting the XApp progress property.
|
|
*/
|
|
|
|
void setPrimaryWindow(in mozIDOMWindowProxy aWindow);
|
|
};
|