naiveproxy/components/pdf/common/pdf.mojom

44 lines
1.5 KiB
Plaintext
Raw Permalink Normal View History

2018-01-28 21:32:06 +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 pdf.mojom;
import "third_party/WebKit/public/platform/referrer.mojom";
import "ui/gfx/geometry/mojo/geometry.mojom";
import "url/mojo/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);
// Notifies the embedder that the PDF scrolled, and thus global coordinates
// of current selection may require adjustment.
DidScroll();
};