blob: 6344a3d3b341152b6fa3bcb34734efbe5a27101c [file] [log] [blame]
// Copyright 2019 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 content_capture.mojom;
import "components/content_capture/common/content_capture_data.mojom";
// This interface helps extract the data of the current page from the
// renderer, each ContentCaptureData represents the on-screen text
// content. The interface has one instance per RenderFrameHost in the
// browser process. All methods are called by renderer.
interface ContentCaptureReceiver {
// Invoked when the |data| is captured, |first_data| indicates if
// this is first data from the document.
DidCaptureContent(ContentCaptureData data, bool first_data);
// Invoked to notify that the |data| which has already been captured is
// updated, if |data| hasn't previously been captured, it will simply be
// ignored.
DidUpdateContent(ContentCaptureData data);
// Invoked to notify that a list of content |ids| has been removed.
DidRemoveContent(array<int64> ids);
};
// This interface has one instance per RenderFrame in renderer process.
interface ContentCaptureSender {
// Invoked to start/stop ContentCapture, it is stopped by default.
StartCapture();
StopCapture();
};