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_PDF_ENGINE_H_ | 5 #ifndef PDF_PDF_ENGINE_H_ |
6 #define PDF_PDF_ENGINE_H_ | 6 #define PDF_PDF_ENGINE_H_ |
7 | 7 |
8 #include "build/build_config.h" | 8 #include "build/build_config.h" |
9 | 9 |
10 #if defined(OS_WIN) | 10 #if defined(OS_WIN) |
(...skipping 234 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
245 virtual void OnCallback(int id) = 0; | 245 virtual void OnCallback(int id) = 0; |
246 // Gets the JSON representation of the PDF file | 246 // Gets the JSON representation of the PDF file |
247 virtual std::string GetPageAsJSON(int index) = 0; | 247 virtual std::string GetPageAsJSON(int index) = 0; |
248 // Gets the PDF document's print scaling preference. True if the document can | 248 // Gets the PDF document's print scaling preference. True if the document can |
249 // be scaled to fit. | 249 // be scaled to fit. |
250 virtual bool GetPrintScaling() = 0; | 250 virtual bool GetPrintScaling() = 0; |
251 // Returns number of copies to be printed. | 251 // Returns number of copies to be printed. |
252 virtual int GetCopiesToPrint() = 0; | 252 virtual int GetCopiesToPrint() = 0; |
253 // Returns the duplex setting. | 253 // Returns the duplex setting. |
254 virtual int GetDuplexType() = 0; | 254 virtual int GetDuplexType() = 0; |
| 255 // Returns true if all the pages are the same size. |
| 256 virtual bool GetPageSizeAndUniformity(pp::Size* size) = 0; |
255 | 257 |
256 // Returns a VarArray of Bookmarks, each a VarDictionary containing the | 258 // Returns a VarArray of Bookmarks, each a VarDictionary containing the |
257 // following key/values: | 259 // following key/values: |
258 // - "title" - a string Var. | 260 // - "title" - a string Var. |
259 // - "page" - an int Var. | 261 // - "page" - an int Var. |
260 // - "children" - a VarArray(), with each entry containing a VarDictionary of | 262 // - "children" - a VarArray(), with each entry containing a VarDictionary of |
261 // the same structure. | 263 // the same structure. |
262 virtual pp::VarArray GetBookmarks() = 0; | 264 virtual pp::VarArray GetBookmarks() = 0; |
263 | 265 |
264 // Append blank pages to make a 1-page document to a |num_pages| document. | 266 // Append blank pages to make a 1-page document to a |num_pages| document. |
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
329 | 331 |
330 // See the definition of GetPDFPageSizeByIndex in pdf.cc for details. | 332 // See the definition of GetPDFPageSizeByIndex in pdf.cc for details. |
331 virtual bool GetPDFPageSizeByIndex(const void* pdf_buffer, | 333 virtual bool GetPDFPageSizeByIndex(const void* pdf_buffer, |
332 int pdf_buffer_size, int page_number, | 334 int pdf_buffer_size, int page_number, |
333 double* width, double* height) = 0; | 335 double* width, double* height) = 0; |
334 }; | 336 }; |
335 | 337 |
336 } // namespace chrome_pdf | 338 } // namespace chrome_pdf |
337 | 339 |
338 #endif // PDF_PDF_ENGINE_H_ | 340 #endif // PDF_PDF_ENGINE_H_ |
OLD | NEW |