/* -*- 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"]; ChromeUtils.defineModuleGetter( this, "DeferredTask", "resource://gre/modules/DeferredTask.jsm" ); ChromeUtils.defineModuleGetter( this, "Services", "resource://gre/modules/Services.jsm" ); ChromeUtils.defineModuleGetter( this, "TOGGLE_POLICIES", "resource://gre/modules/PictureInPictureTogglePolicy.jsm" ); ChromeUtils.defineModuleGetter( this, "TOGGLE_POLICY_STRINGS", "resource://gre/modules/PictureInPictureTogglePolicy.jsm" ); const { XPCOMUtils } = ChromeUtils.import( "resource://gre/modules/XPCOMUtils.jsm" ); 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