naiveproxy/ash/public/interfaces/highlighter_controller.mojom

30 lines
1.0 KiB
Plaintext
Raw Normal View History

2018-12-10 05:59:24 +03:00
// Copyright 2017 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 ash.mojom;
import "ui/gfx/geometry/mojo/geometry.mojom";
// Interface for ash client (e.g. Chrome) to connect to the highlighter
// controller, the component implementing on-screen content selection
// with a stylus.
interface HighlighterController {
// Sets the client interface.
SetClient(HighlighterControllerClient client);
// Exits the highlighter mode if it is currently enabled.
ExitHighlighterMode();
};
// Interface for ash to notify the client (e.g. Chrome) about the highlighter
// selection and state.
interface HighlighterControllerClient {
// Called when when a valid selection is made. Selected rectangle is in
// screen coordinates, clipped to screen bounds if necessary.
HandleSelection(gfx.mojom.Rect rect);
// Called when the highlighter tool becomes enabled or disabled.
HandleEnabledStateChange(bool enabled);
};