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 182 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
193 // Set new zoom scale. | 193 // Set new zoom scale. |
194 void SetZoom(double scale); | 194 void SetZoom(double scale); |
195 | 195 |
196 // Reduces the document to 1 page and appends |print_preview_page_count_| | 196 // Reduces the document to 1 page and appends |print_preview_page_count_| |
197 // blank pages to the document for print preview. | 197 // blank pages to the document for print preview. |
198 void AppendBlankPrintPreviewPages(); | 198 void AppendBlankPrintPreviewPages(); |
199 | 199 |
200 // Process the preview page data information. |src_url| specifies the preview | 200 // Process the preview page data information. |src_url| specifies the preview |
201 // page data location. The |src_url| is in the format: | 201 // page data location. The |src_url| is in the format: |
202 // chrome://print/id/page_number/print.pdf | 202 // chrome://print/id/page_number/print.pdf |
203 // |dst_page_index| specifies the blank page index that needs to be replaced | 203 // |dest_page_index| specifies the blank page index that needs to be replaced |
204 // with the new page data. | 204 // with the new page data. |
205 void ProcessPreviewPageInfo(const std::string& src_url, int dst_page_index); | 205 void ProcessPreviewPageInfo(const std::string& src_url, int dest_page_index); |
206 // Load the next available preview page into the blank page. | 206 // Load the next available preview page into the blank page. |
207 void LoadAvailablePreviewPage(); | 207 void LoadAvailablePreviewPage(); |
208 | 208 |
209 // Bound the given scroll offset to the document. | 209 // Bound the given scroll offset to the document. |
210 pp::FloatPoint BoundScrollOffsetToDocument( | 210 pp::FloatPoint BoundScrollOffsetToDocument( |
211 const pp::FloatPoint& scroll_offset); | 211 const pp::FloatPoint& scroll_offset); |
212 | 212 |
213 pp::ImageData image_data_; | 213 pp::ImageData image_data_; |
214 // Used when the plugin is embedded in a page and we have to create the loader | 214 // Used when the plugin is embedded in a page and we have to create the loader |
215 // ourself. | 215 // ourself. |
(...skipping 162 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
378 | 378 |
379 // True if the plugin is loaded in print preview, otherwise false. | 379 // True if the plugin is loaded in print preview, otherwise false. |
380 bool is_print_preview_; | 380 bool is_print_preview_; |
381 | 381 |
382 DISALLOW_COPY_AND_ASSIGN(OutOfProcessInstance); | 382 DISALLOW_COPY_AND_ASSIGN(OutOfProcessInstance); |
383 }; | 383 }; |
384 | 384 |
385 } // namespace chrome_pdf | 385 } // namespace chrome_pdf |
386 | 386 |
387 #endif // PDF_OUT_OF_PROCESS_INSTANCE_H_ | 387 #endif // PDF_OUT_OF_PROCESS_INSTANCE_H_ |
OLD | NEW |