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

Unified Diff: pdf/out_of_process_instance.h

Issue 2400743002: Improved Pinch-Zoom for PDF. (Closed)
Patch Set: Small changes. Created 4 years, 1 month 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 | « chrome/test/data/pdf/gesture_detector_test.js ('k') | pdf/out_of_process_instance.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pdf/out_of_process_instance.h
diff --git a/pdf/out_of_process_instance.h b/pdf/out_of_process_instance.h
index a998537dfd1e27548cf580d50715c68c928afb51..e6a1589be6fd115dfb4c365175efa6e386ff1888 100644
--- a/pdf/out_of_process_instance.h
+++ b/pdf/out_of_process_instance.h
@@ -235,9 +235,29 @@ class OutOfProcessInstance : public pp::Instance,
// there are 10 pages, the height will be 8000).
pp::Size document_size_;
- double zoom_; // Current zoom factor.
+ // Enumeration of pinch states.
+ // This should match PinchPhase enum in
+ // chrome/browser/resources/pdf/viewport.js
+ enum PinchPhase {
+ PINCH_NONE = 0,
+ PINCH_START = 1,
+ PINCH_UPDATE_ZOOM_OUT = 2,
+ PINCH_UPDATE_ZOOM_IN = 3,
+ PINCH_END = 4
+ };
- float device_scale_; // Current device scale factor.
+ // Current zoom factor.
+ double zoom_;
+ double initial_zoom_ratio_;
+ // True if we request a new bitmap rendering.
+ bool needs_reraster_;
+ // Scroll position at the start of a pinch zoom.
+ pp::FloatPoint starting_scroll_offset_;
+ // True if last bitmap was smaller than screen.
+ bool last_bitmap_smaller_;
+ double last_zoom_when_smaller_;
+ // Current device scale factor.
+ float device_scale_;
// True if the plugin is full-page.
bool full_;
« no previous file with comments | « chrome/test/data/pdf/gesture_detector_test.js ('k') | pdf/out_of_process_instance.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698