| 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 <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include "build/build_config.h" | 10 #include "build/build_config.h" |
| (...skipping 277 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 288 | 288 |
| 289 // Allow client to query and reset scroll positions in document coordinates. | 289 // Allow client to query and reset scroll positions in document coordinates. |
| 290 // Note that this is meant for cases where the device scale factor changes, | 290 // Note that this is meant for cases where the device scale factor changes, |
| 291 // and not for general scrolling - the engine will not repaint due to this. | 291 // and not for general scrolling - the engine will not repaint due to this. |
| 292 virtual pp::Point GetScrollPosition() = 0; | 292 virtual pp::Point GetScrollPosition() = 0; |
| 293 virtual void SetScrollPosition(const pp::Point& position) = 0; | 293 virtual void SetScrollPosition(const pp::Point& position) = 0; |
| 294 | 294 |
| 295 virtual bool IsProgressiveLoad() = 0; | 295 virtual bool IsProgressiveLoad() = 0; |
| 296 | 296 |
| 297 virtual std::string GetMetadata(const std::string& key) = 0; | 297 virtual std::string GetMetadata(const std::string& key) = 0; |
| 298 |
| 299 // Get a list of rects of links in the most visible page. |
| 300 virtual std::vector<pp::Rect> GetLinkRects() = 0; |
| 298 }; | 301 }; |
| 299 | 302 |
| 300 // Interface for exports that wrap the PDF engine. | 303 // Interface for exports that wrap the PDF engine. |
| 301 class PDFEngineExports { | 304 class PDFEngineExports { |
| 302 public: | 305 public: |
| 303 struct RenderingSettings { | 306 struct RenderingSettings { |
| 304 RenderingSettings(int dpi_x, | 307 RenderingSettings(int dpi_x, |
| 305 int dpi_y, | 308 int dpi_y, |
| 306 const pp::Rect& bounds, | 309 const pp::Rect& bounds, |
| 307 bool fit_to_bounds, | 310 bool fit_to_bounds, |
| (...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 350 | 353 |
| 351 // See the definition of GetPDFPageSizeByIndex in pdf.cc for details. | 354 // See the definition of GetPDFPageSizeByIndex in pdf.cc for details. |
| 352 virtual bool GetPDFPageSizeByIndex(const void* pdf_buffer, | 355 virtual bool GetPDFPageSizeByIndex(const void* pdf_buffer, |
| 353 int pdf_buffer_size, int page_number, | 356 int pdf_buffer_size, int page_number, |
| 354 double* width, double* height) = 0; | 357 double* width, double* height) = 0; |
| 355 }; | 358 }; |
| 356 | 359 |
| 357 } // namespace chrome_pdf | 360 } // namespace chrome_pdf |
| 358 | 361 |
| 359 #endif // PDF_PDF_ENGINE_H_ | 362 #endif // PDF_PDF_ENGINE_H_ |
| OLD | NEW |