// Copyright 2023 The Chromium Authors // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #ifndef CHROME_BROWSER_COMPANION_TEXT_FINDER_TEXT_FINDER_H_ #define CHROME_BROWSER_COMPANION_TEXT_FINDER_TEXT_FINDER_H_ #include <string> #include "mojo/public/cpp/bindings/receiver.h" #include "mojo/public/cpp/bindings/remote.h" #include "third_party/blink/public/mojom/annotation/annotation.mojom.h" #include "ui/gfx/geometry/rect.h" namespace companion { // Class for initiating text search via the annotation agent in the renderer // process. Note that the current implementation relies on the existing // annotation agent implementation: // `third_party/blink/renderer/core/annotation/annotation_agent_impl.h`, // which will both perform text search and highlight the text. // To remove the highlight effect, this `TextFinder` immediately resets // the mojo connection upon finishing searching, to remove the annotation // agent. In the follow-up, we will implement a new type of annotation agent // that only performs text search without highlighting text. // See crbug.com/1430306. class TextFinder : public blink::mojom::AnnotationAgentHost { … }; } // namespace companion #endif // CHROME_BROWSER_COMPANION_TEXT_FINDER_TEXT_FINDER_H_