/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */ /* 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/. */ "use strict"; var EXPORTED_SYMBOLS = ["PictureInPictureChild", "PictureInPictureToggleChild"]; const { ActorChild } = ChromeUtils.import( "resource://gre/modules/ActorChild.jsm" ); const { XPCOMUtils } = ChromeUtils.import( "resource://gre/modules/XPCOMUtils.jsm" ); ChromeUtils.defineModuleGetter( this, "DeferredTask", "resource://gre/modules/DeferredTask.jsm" ); ChromeUtils.defineModuleGetter( this, "Services", "resource://gre/modules/Services.jsm" ); XPCOMUtils.defineLazyGlobalGetters(this, ["InspectorUtils"]); const TOGGLE_ENABLED_PREF = "media.videocontrols.picture-in-picture.video-toggle.enabled"; const TOGGLE_TESTING_PREF = "media.videocontrols.picture-in-picture.video-toggle.testing"; const MOUSEMOVE_PROCESSING_DELAY_MS = 50; const TOGGLE_HIDING_TIMEOUT_MS = 2000; // A weak reference to the most recent