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

Side by Side Diff: pdf/out_of_process_instance.h

Issue 2400743002: Improved Pinch-Zoom for PDF. (Closed)
Patch Set: Created 4 years, 2 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef PDF_OUT_OF_PROCESS_INSTANCE_H_ 5 #ifndef PDF_OUT_OF_PROCESS_INSTANCE_H_
6 #define PDF_OUT_OF_PROCESS_INSTANCE_H_ 6 #define PDF_OUT_OF_PROCESS_INSTANCE_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 #include <string.h> 9 #include <string.h>
10 10
(...skipping 217 matching lines...) Expand 10 before | Expand all | Expand 10 after
228 pp::Size plugin_size_; 228 pp::Size plugin_size_;
229 // Size, in DIPs, of plugin rectangle. 229 // Size, in DIPs, of plugin rectangle.
230 pp::Size plugin_dip_size_; 230 pp::Size plugin_dip_size_;
231 // Remaining area, in pixels, to render the pdf in after accounting for 231 // Remaining area, in pixels, to render the pdf in after accounting for
232 // horizontal centering. 232 // horizontal centering.
233 pp::Rect available_area_; 233 pp::Rect available_area_;
234 // Size of entire document in pixels (i.e. if each page is 800 pixels high and 234 // Size of entire document in pixels (i.e. if each page is 800 pixels high and
235 // there are 10 pages, the height will be 8000). 235 // there are 10 pages, the height will be 8000).
236 pp::Size document_size_; 236 pp::Size document_size_;
237 237
238 double zoom_; // Current zoom factor. 238 // Current zoom factor.
239 239 double zoom_;
240 float device_scale_; // Current device scale factor. 240 double old_zoom_, initial_zoom_delta_;
241 // True if we request a new bitmap rendering.
242 bool do_render_;
243 // Scroll at the begining of zooming.
244 pp::FloatPoint last_current_scroll_;
245 // True if last bitmap was smaller than screen.
246 bool was_smaller_;
247 // Current device scale factor.
248 float device_scale_;
241 // True if the plugin is full-page. 249 // True if the plugin is full-page.
242 bool full_; 250 bool full_;
243 251
244 PaintManager paint_manager_; 252 PaintManager paint_manager_;
245 253
246 struct BackgroundPart { 254 struct BackgroundPart {
247 pp::Rect location; 255 pp::Rect location;
248 uint32_t color; 256 uint32_t color;
249 }; 257 };
250 std::vector<BackgroundPart> background_parts_; 258 std::vector<BackgroundPart> background_parts_;
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after
362 ACCESSIBILITY_STATE_PENDING, // Enabled but waiting for doc to load. 370 ACCESSIBILITY_STATE_PENDING, // Enabled but waiting for doc to load.
363 ACCESSIBILITY_STATE_LOADED 371 ACCESSIBILITY_STATE_LOADED
364 } accessibility_state_; 372 } accessibility_state_;
365 373
366 DISALLOW_COPY_AND_ASSIGN(OutOfProcessInstance); 374 DISALLOW_COPY_AND_ASSIGN(OutOfProcessInstance);
367 }; 375 };
368 376
369 } // namespace chrome_pdf 377 } // namespace chrome_pdf
370 378
371 #endif // PDF_OUT_OF_PROCESS_INSTANCE_H_ 379 #endif // PDF_OUT_OF_PROCESS_INSTANCE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698