/* 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"; let { classes: Cc, interfaces: Ci, results: Cr, utils: Cu } = Components; Cu.import("resource://gre/modules/XPCOMUtils.jsm"); Cu.import("resource://gre/modules/Services.jsm"); Cu.import("resource://gre/modules/Geometry.jsm"); Cu.import("resource://gre/modules/BrowserElementPromptService.jsm"); // Event whitelisted for bubbling. let whitelistedEvents = [ Ci.nsIDOMKeyEvent.DOM_VK_ESCAPE, // Back button. Ci.nsIDOMKeyEvent.DOM_VK_SLEEP, // Power button. Ci.nsIDOMKeyEvent.DOM_VK_CONTEXT_MENU, Ci.nsIDOMKeyEvent.DOM_VK_F5, // Search button. Ci.nsIDOMKeyEvent.DOM_VK_PAGE_UP, // Volume up. Ci.nsIDOMKeyEvent.DOM_VK_PAGE_DOWN // Volume down. ]; function debug(msg) { //dump("BrowserElementChild - " + msg + "\n"); } function sendAsyncMsg(msg, data) { sendAsyncMessage('browser-element-api:' + msg, data); } function sendSyncMsg(msg, data) { return sendSyncMessage('browser-element-api:' + msg, data); } /** * The BrowserElementChild implements one half of