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 256 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
267 // document at page |index|. | 267 // document at page |index|. |
268 virtual void AppendPage(PDFEngine* engine, int index) = 0; | 268 virtual void AppendPage(PDFEngine* engine, int index) = 0; |
269 | 269 |
270 // Allow client to query and reset scroll positions in document coordinates. | 270 // Allow client to query and reset scroll positions in document coordinates. |
271 // Note that this is meant for cases where the device scale factor changes, | 271 // Note that this is meant for cases where the device scale factor changes, |
272 // and not for general scrolling - the engine will not repaint due to this. | 272 // and not for general scrolling - the engine will not repaint due to this. |
273 virtual pp::Point GetScrollPosition() = 0; | 273 virtual pp::Point GetScrollPosition() = 0; |
274 virtual void SetScrollPosition(const pp::Point& position) = 0; | 274 virtual void SetScrollPosition(const pp::Point& position) = 0; |
275 | 275 |
276 virtual bool IsProgressiveLoad() = 0; | 276 virtual bool IsProgressiveLoad() = 0; |
277 virtual pp::VarDictionary GetNamedDestinations() = 0; | |
278 }; | 277 }; |
279 | 278 |
280 // Interface for exports that wrap the PDF engine. | 279 // Interface for exports that wrap the PDF engine. |
281 class PDFEngineExports { | 280 class PDFEngineExports { |
282 public: | 281 public: |
283 struct RenderingSettings { | 282 struct RenderingSettings { |
284 RenderingSettings(int dpi_x, | 283 RenderingSettings(int dpi_x, |
285 int dpi_y, | 284 int dpi_y, |
286 const pp::Rect& bounds, | 285 const pp::Rect& bounds, |
287 bool fit_to_bounds, | 286 bool fit_to_bounds, |
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
329 | 328 |
330 // See the definition of GetPDFPageSizeByIndex in pdf.cc for details. | 329 // See the definition of GetPDFPageSizeByIndex in pdf.cc for details. |
331 virtual bool GetPDFPageSizeByIndex(const void* pdf_buffer, | 330 virtual bool GetPDFPageSizeByIndex(const void* pdf_buffer, |
332 int pdf_buffer_size, int page_number, | 331 int pdf_buffer_size, int page_number, |
333 double* width, double* height) = 0; | 332 double* width, double* height) = 0; |
334 }; | 333 }; |
335 | 334 |
336 } // namespace chrome_pdf | 335 } // namespace chrome_pdf |
337 | 336 |
338 #endif // PDF_PDF_ENGINE_H_ | 337 #endif // PDF_PDF_ENGINE_H_ |
OLD | NEW |