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