OLD | NEW |
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 204 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
215 pp::Size plugin_size_; | 215 pp::Size plugin_size_; |
216 // Size, in DIPs, of plugin rectangle. | 216 // Size, in DIPs, of plugin rectangle. |
217 pp::Size plugin_dip_size_; | 217 pp::Size plugin_dip_size_; |
218 // Remaining area, in pixels, to render the pdf in after accounting for | 218 // Remaining area, in pixels, to render the pdf in after accounting for |
219 // horizontal centering. | 219 // horizontal centering. |
220 pp::Rect available_area_; | 220 pp::Rect available_area_; |
221 // Size of entire document in pixels (i.e. if each page is 800 pixels high and | 221 // Size of entire document in pixels (i.e. if each page is 800 pixels high and |
222 // there are 10 pages, the height will be 8000). | 222 // there are 10 pages, the height will be 8000). |
223 pp::Size document_size_; | 223 pp::Size document_size_; |
224 | 224 |
225 double zoom_; // Current zoom factor. | 225 // Current zoom factor. |
226 | 226 double zoom_; |
227 float device_scale_; // Current device scale factor. | 227 double old_zoom_, initial_zoom_delta_; |
| 228 // True if we request a new bitmap rendering. |
| 229 bool do_render_; |
| 230 // Scroll at the begining of zooming. |
| 231 pp::FloatPoint last_current_scroll_; |
| 232 // True if last bitmap was smaller than screen. |
| 233 bool was_smaller_; |
| 234 // Current device scale factor. |
| 235 float device_scale_; |
228 // True if the plugin is full-page. | 236 // True if the plugin is full-page. |
229 bool full_; | 237 bool full_; |
230 | 238 |
231 PaintManager paint_manager_; | 239 PaintManager paint_manager_; |
232 | 240 |
233 struct BackgroundPart { | 241 struct BackgroundPart { |
234 pp::Rect location; | 242 pp::Rect location; |
235 uint32_t color; | 243 uint32_t color; |
236 }; | 244 }; |
237 std::vector<BackgroundPart> background_parts_; | 245 std::vector<BackgroundPart> background_parts_; |
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
341 // The blank space above the first page of the document reserved for the | 349 // The blank space above the first page of the document reserved for the |
342 // toolbar. | 350 // toolbar. |
343 int top_toolbar_height_; | 351 int top_toolbar_height_; |
344 | 352 |
345 DISALLOW_COPY_AND_ASSIGN(OutOfProcessInstance); | 353 DISALLOW_COPY_AND_ASSIGN(OutOfProcessInstance); |
346 }; | 354 }; |
347 | 355 |
348 } // namespace chrome_pdf | 356 } // namespace chrome_pdf |
349 | 357 |
350 #endif // PDF_OUT_OF_PROCESS_INSTANCE_H_ | 358 #endif // PDF_OUT_OF_PROCESS_INSTANCE_H_ |
OLD | NEW |