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

fix: add missed SaveRequestType enum to PdfViewerPrivate function

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
This commit is contained in:
BILL SHEN
2025-10-03 23:59:30 +08:00
committed by GitHub
parent 074d0e19fb
commit 6dc3923b93
4 changed files with 58 additions and 0 deletions

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,