Bug 1768334 [wpt PR 33981] - [block-in-inline] Fix hit-testing when a block-in-inline...
[gecko.git] / mobile / android / actors / GeckoViewPromptChild.jsm
blob927b04bf6bbb62e750c2562388cae2d2dd7c0381
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/. */
5 const { GeckoViewActorChild } = ChromeUtils.import(
6   "resource://gre/modules/GeckoViewActorChild.jsm"
7 );
9 const { XPCOMUtils } = ChromeUtils.import(
10   "resource://gre/modules/XPCOMUtils.jsm"
13 const { Services } = ChromeUtils.import("resource://gre/modules/Services.jsm");
15 const EXPORTED_SYMBOLS = ["GeckoViewPromptChild"];
17 class GeckoViewPromptChild extends GeckoViewActorChild {
18   handleEvent(event) {
19     const { type } = event;
20     debug`handleEvent: ${type}`;
22     switch (type) {
23       case "MozOpenDateTimePicker":
24       case "mozshowdropdown":
25       case "mozshowdropdown-sourcetouch":
26       case "click":
27       case "contextmenu":
28       case "DOMPopupBlocked":
29         Services.prompt.wrappedJSObject.handleEvent(event);
30     }
31   }
34 const { debug, warn } = GeckoViewPromptChild.initLogging("GeckoViewPrompt");