summaryrefslogtreecommitdiff
path: root/chromium/pdf/out_of_process_instance.h
diff options
context:
space:
mode:
authorAllan Sandfeld Jensen <allan.jensen@qt.io>2020-10-12 14:27:29 +0200
committerAllan Sandfeld Jensen <allan.jensen@qt.io>2020-10-13 09:35:20 +0000
commitc30a6232df03e1efbd9f3b226777b07e087a1122 (patch)
treee992f45784689f373bcc38d1b79a239ebe17ee23 /chromium/pdf/out_of_process_instance.h
parent7b5b123ac58f58ffde0f4f6e488bcd09aa4decd3 (diff)
downloadqtwebengine-chromium-85-based.tar.gz
BASELINE: Update Chromium to 85.0.4183.14085-based
Change-Id: Iaa42f4680837c57725b1344f108c0196741f6057 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
Diffstat (limited to 'chromium/pdf/out_of_process_instance.h')
-rw-r--r--chromium/pdf/out_of_process_instance.h26
1 files changed, 23 insertions, 3 deletions
diff --git a/chromium/pdf/out_of_process_instance.h b/chromium/pdf/out_of_process_instance.h
index db8f4b476e4..b39d0dec7b4 100644
--- a/chromium/pdf/out_of_process_instance.h
+++ b/chromium/pdf/out_of_process_instance.h
@@ -111,6 +111,7 @@ class OutOfProcessInstance : public pp::Instance,
void UpdateTickMarks(const std::vector<pp::Rect>& tickmarks) override;
void NotifyNumberOfFindResultsChanged(int total, bool final_result) override;
void NotifySelectedFindResultChanged(int current_find_index) override;
+ void NotifyTouchSelectionOccurred() override;
void GetDocumentPassword(
pp::CompletionCallbackWithOutput<pp::Var> callback) override;
void Beep() override;
@@ -143,8 +144,9 @@ class OutOfProcessInstance : public pp::Instance,
uint32_t GetBackgroundColor() override;
void IsSelectingChanged(bool is_selecting) override;
void SelectionChanged(const pp::Rect& left, const pp::Rect& right) override;
- void IsEditModeChanged(bool is_edit_mode) override;
+ void EnteredEditMode() override;
float GetToolbarHeightInScreenCoords() override;
+ void DocumentFocusChanged(bool document_has_focus) override;
// PreviewModeClient::Client implementation.
void PreviewDocumentLoadComplete() override;
@@ -153,13 +155,24 @@ class OutOfProcessInstance : public pp::Instance,
// Helper functions for implementing PPP_PDF.
void RotateClockwise();
void RotateCounterclockwise();
- void SetTwoUpView(bool enable_two_up_view);
// Creates a file name for saving a PDF file, given the source URL. Exposed
// for testing.
static std::string GetFileNameFromUrl(const std::string& url);
private:
+ // Message handlers.
+ void HandleBackgroundColorChangedMessage(const pp::VarDictionary& dict);
+ void HandleDisplayAnnotations(const pp::VarDictionary& dict);
+ void HandleGetNamedDestinationMessage(const pp::VarDictionary& dict);
+ void HandleGetPasswordCompleteMessage(const pp::VarDictionary& dict);
+ void HandleGetSelectedTextMessage();
+ void HandleLoadPreviewPageMessage(const pp::VarDictionary& dict);
+ void HandlePrintMessage(const pp::VarDictionary& dict);
+ void HandleResetPrintPreviewModeMessage(const pp::VarDictionary& dict);
+ void HandleSetTwoUpViewMessage(const pp::VarDictionary& dict);
+ void HandleViewportMessage(const pp::VarDictionary& dict);
+
void ResetRecentlySentFindUpdate(int32_t);
// Called whenever the plugin geometry changes to update the location of the
@@ -184,7 +197,7 @@ class OutOfProcessInstance : public pp::Instance,
// frame's origin.
pp::URLLoader CreateURLLoaderInternal();
- bool ShouldSaveEdits() const;
+ bool CanSaveEdits() const;
void SaveToFile(const std::string& token);
void SaveToBuffer(const std::string& token);
void ConsumeSaveToken(const std::string& token);
@@ -210,6 +223,13 @@ class OutOfProcessInstance : public pp::Instance,
LOAD_STATE_FAILED,
};
+ // Must match SaveRequestType in chrome/browser/resources/pdf/constants.js.
+ enum class SaveRequestType {
+ kAnnotation = 0,
+ kOriginal = 1,
+ kEdited = 2,
+ };
+
// Set new zoom scale.
void SetZoom(double scale);