Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(392)

Unified Diff: pdf/pdfium/pdfium_engine.h

Issue 2924343005: Add functionality for copying text within form text fields and form combobox text fields (Closed)
Patch Set: Add braces around multi-line conditional Created 3 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | pdf/pdfium/pdfium_engine.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pdf/pdfium/pdfium_engine.h
diff --git a/pdf/pdfium/pdfium_engine.h b/pdf/pdfium/pdfium_engine.h
index 6620c77cb6bad9313550bdb79835ac494e61afdb..8e9977a292f79268a3ff6da9bc50a1db94a3be65 100644
--- a/pdf/pdfium/pdfium_engine.h
+++ b/pdf/pdfium/pdfium_engine.h
@@ -318,6 +318,10 @@ class PDFiumEngine : public PDFEngine,
const PP_PrintSettings_Dev& print_settings);
void SaveSelectedFormForPrint();
+ // Checks if |page| has selected text in a form element. If so, sets that as
+ // the plugin's text selection.
+ void SetFormSelectedText(FPDF_FORMHANDLE form_handle, FPDF_PAGE page);
+
// Given a mouse event, returns which page and character location it's closest
// to.
PDFiumPage::Area GetCharIndex(const pp::MouseInputEvent& event,
@@ -437,9 +441,14 @@ class PDFiumEngine : public PDFEngine,
// Common code shared by RotateClockwise() and RotateCounterclockwise().
void RotateInternal();
- // Setting selection status of document.
+ // Sets text selection status of document. This does not include text
+ // within form text fields.
void SetSelecting(bool selecting);
+ // Sets whether or not focus is in form text field or form combobox text
+ // field.
+ void SetInFormTextArea(bool in_form_text_area);
+
bool PageIndexInBounds(int index) const;
void ScheduleTouchTimer(const pp::TouchInputEvent& event);
@@ -640,12 +649,15 @@ class PDFiumEngine : public PDFEngine,
bool defer_page_unload_;
std::vector<int> deferred_page_unloads_;
- // Used for selection. There could be more than one range if selection spans
- // more than one page.
+ // Used for text selection, but does not include text within form text fields.
+ // There could be more than one range if selection spans more than one page.
std::vector<PDFiumRange> selection_;
- // True if we're in the middle of selection.
+ // True if we're in the middle of text selection.
bool selecting_;
+ // True if focus is in form text field or form combobox text field.
+ bool in_form_text_area_;
+
MouseDownState mouse_down_state_;
// Used for searching.
« no previous file with comments | « no previous file | pdf/pdfium/pdfium_engine.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698