summaryrefslogtreecommitdiffstats
path: root/toolkit/components/windowwatcher/test/head.js
blob: 911a56efac645cc73510d3c0e69dbdb8b472c8f3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
/**
 * Given some nsIDOMWindow for a window running in the parent
 * process, return the nsIWebBrowserChrome chrome flags for
 * the associated XUL window.
 *
 * @param win (nsIDOMWindow)
 *        Some window in the parent process.
 * @returns int
 */
function getParentChromeFlags(win) {
  return win.docShell.treeOwner
    .QueryInterface(Ci.nsIInterfaceRequestor)
    .getInterface(Ci.nsIAppWindow).chromeFlags;
}