// Copyright 2022 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
module blink.mojom;
import "url/mojom/url.mojom";
// Holds information about the mouse/touch user interaction with the anchor
// element.
struct AnchorElementPointerData {
// Whether the pointer that moved was a mouse. It does not distinguish between
// different types of mouse devices e.g. laptop trackpad vs traditional mouse.
bool is_mouse_pointer;
// Mouse movement velocity.
double mouse_velocity;
// Tangential component of mouse movement acceleration.
double mouse_acceleration;
};
// Interface for sending the URL from the renderer side to browser process.
interface AnchorElementInteractionHost {
// On pointer down events for anchor elements that are part of the HTTP family,
// the renderer calls OnPointerDown to pass the URL to the browser process.
// In the browser process, the URL gets preloaded.
OnPointerDown(url.mojom.Url target);
// On pointer hover events for anchor elements that are part of the HTTP family,
// the renderer calls OnPointerHover to pass the URL to the browser process.
// In the browser process, the URL gets preloaded.
OnPointerHover(url.mojom.Url target,
AnchorElementPointerData mouse_data);
};