/* 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 = ["SearchOneOffs"]; const { XPCOMUtils } = ChromeUtils.import( "resource://gre/modules/XPCOMUtils.jsm" ); XPCOMUtils.defineLazyModuleGetters(this, { clearTimeout: "resource://gre/modules/Timer.jsm", PrivateBrowsingUtils: "resource://gre/modules/PrivateBrowsingUtils.jsm", SearchUIUtils: "resource:///modules/SearchUIUtils.jsm", Services: "resource://gre/modules/Services.jsm", setTimeout: "resource://gre/modules/Timer.jsm", }); /** * Defines the search one-off button elements. These are displayed at the bottom * of the address bar and search bar. The address bar buttons are a subclass in * browser/components/urlbar/UrlbarSearchOneOffs.jsm. If you are adding a new * subclass, see "Methods for subclasses to override" below. */ class SearchOneOffs { constructor(container) { this.container = container; this.window = container.ownerGlobal; this.document = container.ownerDocument; this.container.appendChild( this.window.MozXULElement.parseXULToFragment( `