blob: 06be4fe389622dd9d83189c8cf271e0cd86c4eac [file] [log] [blame]
// Copyright 2020 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
module blink.mojom;
import "ui/gfx/geometry/mojom/geometry.mojom";
// Implemented in Browser, this interface defines methods that will be invoked
// from the render process for the reply to TextInputClientMac.
//
// Note that due to implementation details of TextInputClient on Mac this has
// stricter threading requirements. Also read the comment at the implementation
// (i.e. TextInputHostImpl).
interface TextInputHost {
// Reply for GetCharacterIndexAtPoint from LocalFrame.
// When GetCharacterIndexAtPoint is called in Browser, BrowserThread::UI is
// blocked at TextInputClientMac to support the reply synchronously with
// a timeout on Mac. So, it needs a separate message,
// GotCharacterIndexAtPoint, that runs on BrowserThread::IO and unblocks
// BrowserThread::UI.
// [EnableIf=is_mac]
GotCharacterIndexAtPoint(uint32 index);
// Reply for GetFirstRectForRange from LocalFrame. It works in the same
// manner as GetCharacterIndexAtPoint.
// [EnableIf=is_mac]
GotFirstRectForRange(gfx.mojom.Rect rect);
};