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

Unified Diff: pdf/pdfium/pdfium_engine.h

Issue 553433002: PDF Viewer - Links should open on mouse up (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Review feedback (rebase, nit fix) Created 6 years, 3 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 a320ba10c78100fba4d64b0b39bba05e2cb2f003..6c8368ae749caff67dc57510de83d2a9df3138db 100644
--- a/pdf/pdfium/pdfium_engine.h
+++ b/pdf/pdfium/pdfium_engine.h
@@ -509,6 +509,24 @@ class PDFiumEngine : public PDFEngine,
// True if we're in the middle of selection.
bool selecting_;
+ // Used to store mouse down state to handle it in other mouse event handlers.
+ struct MouseDownState {
+ MouseDownState() {};
+ MouseDownState(PDFiumPage::Area area, PDFiumPage::LinkTarget target)
+ : area_(area), target_(target) {};
+ PDFiumPage::Area area_;
+ PDFiumPage::LinkTarget target_;
+
+ bool operator==(const MouseDownState& rhs) const {
+ return (area_ == rhs.area_) && (target_.url == rhs.target_.url);
+ }
+
+ bool operator!=(const MouseDownState rhs) const {
+ return (area_ != rhs.area_) || (target_.url != rhs.target_.url);
+ }
+ };
+ MouseDownState mouse_down_state_;
+
// Used for searching.
typedef std::vector<PDFiumRange> FindResults;
FindResults find_results_;
« 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