1 /* This Source Code Form is subject to the terms of the Mozilla Public
2 * License, v. 2.0. If a copy of the MPL was not distributed with this
3 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
7 var EXPORTED_SYMBOLS = ["WindowManager"];
9 const { Services } = ChromeUtils.import("resource://gre/modules/Services.jsm");
10 const { EventPromise } = ChromeUtils.import("chrome://remote/content/Sync.jsm");
14 if (window != Services.focus.activeWindow) {
16 EventPromise(window, "activate"),
17 EventPromise(window, "focus", { capture: true }),
22 await Promise.all(promises);