// 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 pdf.mojom; import "third_party/blink/public/platform/referrer.mojom"; import "ui/gfx/geometry/mojo/geometry.mojom"; import "url/mojom/url.mojom"; interface PdfListener { // Sets the current caret position. SetCaretPosition(gfx.mojom.PointF position); // Move the end of the range selection to |extent|. MoveRangeSelectionExtent(gfx.mojom.PointF extent); // Sets the selection to be between |base| and |extent|. The |extent| will // be moved if the selection is modified. SetSelectionBounds(gfx.mojom.PointF base, gfx.mojom.PointF extent); }; interface PdfService { SetListener(PdfListener client); // Updates the content restrictions, i.e. to disable print/copy. UpdateContentRestrictions(int32 restrictions); // The currently displayed PDF has an unsupported feature. HasUnsupportedFeature(); // Brings up SaveAs... dialog to save specified URL. SaveUrlAs(url.mojom.Url url, blink.mojom.Referrer referrer); // Notifies the embedder of the top-left and bottom-right coordinates of the // current selection. SelectionChanged(gfx.mojom.PointF left, int32 left_height, gfx.mojom.PointF right, int32 right_height); };