Chromium Code Reviews| 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 virtual std::vector<pp::Rect> GetLinkRects() = 0; | |
|
Lei Zhang
2016/07/08 18:02:36
Add a comment to explain what this does.
jaepark
2016/07/08 20:58:16
Done.
| |
| 298 }; | 300 }; |
| 299 | 301 |
| 300 // Interface for exports that wrap the PDF engine. | 302 // Interface for exports that wrap the PDF engine. |
| 301 class PDFEngineExports { | 303 class PDFEngineExports { |
| 302 public: | 304 public: |
| 303 struct RenderingSettings { | 305 struct RenderingSettings { |
| 304 RenderingSettings(int dpi_x, | 306 RenderingSettings(int dpi_x, |
| 305 int dpi_y, | 307 int dpi_y, |
| 306 const pp::Rect& bounds, | 308 const pp::Rect& bounds, |
| 307 bool fit_to_bounds, | 309 bool fit_to_bounds, |
| (...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 350 | 352 |
| 351 // See the definition of GetPDFPageSizeByIndex in pdf.cc for details. | 353 // See the definition of GetPDFPageSizeByIndex in pdf.cc for details. |
| 352 virtual bool GetPDFPageSizeByIndex(const void* pdf_buffer, | 354 virtual bool GetPDFPageSizeByIndex(const void* pdf_buffer, |
| 353 int pdf_buffer_size, int page_number, | 355 int pdf_buffer_size, int page_number, |
| 354 double* width, double* height) = 0; | 356 double* width, double* height) = 0; |
| 355 }; | 357 }; |
| 356 | 358 |
| 357 } // namespace chrome_pdf | 359 } // namespace chrome_pdf |
| 358 | 360 |
| 359 #endif // PDF_PDF_ENGINE_H_ | 361 #endif // PDF_PDF_ENGINE_H_ |
| OLD | NEW |