| // Copyright 2025 The Chromium Authors |
| // Use of this source code is governed by a BSD-style license that can be |
| // found in the LICENSE file. |
| |
| module composebox.mojom; |
| |
| import "components/omnibox/browser/searchbox.mojom"; |
| |
| // Used by the WebUI page to bootstrap bidirectional communication. |
| interface PageHandlerFactory { |
| // The component calls this method when it is first initialized. |
| CreatePageHandler(pending_remote<Page> page, |
| pending_receiver<PageHandler> handler, |
| pending_remote<searchbox.mojom.Page> searchbox_page, |
| pending_receiver<searchbox.mojom.PageHandler> searchbox_handler); |
| }; |
| |
| // Browser-side handler for requests from NTP Composebox UI. |
| interface PageHandler { |
| // Called when the user enters/loses focus into the composebox. |
| FocusChanged(bool focused); |
| // Called when the user enables deep search mode. |
| SetDeepSearchMode(bool enabled); |
| // Called when the user enables create image mode. |
| SetCreateImageMode(bool enabled, bool image_present); |
| |
| // Called when the Lens button is clicked in the composebox. |
| HandleLensButtonClick(); |
| }; |
| |
| // NewTabPage WebUI-side handler for requests from the browser. |
| interface Page {}; |