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

fix: add missed SaveRequestType enum to PdfViewerPrivate function
This commit is contained in:
BILL SHEN
2025-09-27 04:34:06 +08:00
committed by GitHub
parent 3a7c6dd4a5
commit d4a5fdc8fc

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,