1 /* vim: set ts=2 sw=2 sts=2 et tw=80: */
2 /* This Source Code Form is subject to the terms of the Mozilla Public
3 * License, v. 2.0. If a copy of the MPL was not distributed with this
4 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
8 ChromeUtils.defineESModuleGetters(lazy, {
9 FindContent: "resource://gre/modules/FindContent.sys.mjs",
12 export class ExtFindChild extends JSWindowActorChild {
13 receiveMessage(message) {
14 if (!this._findContent) {
15 this._findContent = new lazy.FindContent(this.docShell);
18 switch (message.name) {
19 case "ext-Finder:CollectResults":
20 this.finderInited = true;
21 return this._findContent.findRanges(message.data);
22 case "ext-Finder:HighlightResults":
23 return this._findContent.highlightResults(message.data);
24 case "ext-Finder:ClearHighlighting":
25 this._findContent.highlighter.highlight(false);