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.defineModuleGetter(
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);
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);