Bug 1826682 - Re-Configure() webgpu canvases on resize. r=webgpu-reviewers,nical...
[gecko.git] / toolkit / actors / ExtFindChild.sys.mjs
blob1a5b965cec216eda75fef59531366d979964a6d3
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/. */
6 const lazy = {};
8 ChromeUtils.defineModuleGetter(
9   lazy,
10   "FindContent",
11   "resource://gre/modules/FindContent.jsm"
14 export class ExtFindChild extends JSWindowActorChild {
15   receiveMessage(message) {
16     if (!this._findContent) {
17       this._findContent = new lazy.FindContent(this.docShell);
18     }
20     switch (message.name) {
21       case "ext-Finder:CollectResults":
22         this.finderInited = true;
23         return this._findContent.findRanges(message.data);
24       case "ext-Finder:HighlightResults":
25         return this._findContent.highlightResults(message.data);
26       case "ext-Finder:ClearHighlighting":
27         this._findContent.highlighter.highlight(false);
28         break;
29     }
31     return null;
32   }