fix: add missed enum SaveRequestType to PdfViewerPrivate function (#48404)

fix: add missed SaveRequestType enum to PdfViewerPrivate function

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Bill Shen <15865969+cucbin@users.noreply.github.com>
This commit is contained in:
trop[bot]
2025-09-29 20:08:42 +02:00
committed by GitHub
parent c15d8a4a37
commit 918a08f1e4

View File

@@ -6,6 +6,15 @@
// functionality that the PDF Viewer needs from outside the PDF plugin. This API
// is exclusively for the PDF Viewer.
namespace pdfViewerPrivate {
// Must match `SaveRequestType` in `pdf/mojom/pdf.mojom` and
// `tools/typescript/definitions/pdf_viewer_private.d.ts`.
enum SaveRequestType {
ANNOTATION,
ORIGINAL,
EDITED,
SEARCHIFIED
};
// Nearly identical to mimeHandlerPrivate.StreamInfo, but without a mime type
// nor a response header field. Those fields are unused by the PDF viewer.
dictionary StreamInfo {
@@ -52,6 +61,13 @@ namespace pdfViewerPrivate {
DOMString url,
IsAllowedLocalFileAccessCallback callback);
// Sends a request to save the PDF to Google Drive if `saveRequestType` is
// set. Otherwise, if `saveRequestType` is not set, the default action is
// to cancel the existing upload.
static void saveToDrive(
optional SaveRequestType saveRequestType,
optional VoidCallback callback);
// Sets the current tab title to `title` for a full-page PDF.
static void setPdfDocumentTitle(
DOMString title,