mirror of
https://github.com/electron/electron.git
synced 2026-01-08 23:18:06 -05:00
fix: add missed enum SaveRequestType to PdfViewerPrivate function (#48372)
fix: add missed SaveRequestType enum to PdfViewerPrivate function
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user