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 215 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
226 // Gets the 0-based page number of |destination|, or -1 if it does not exist. | 226 // Gets the 0-based page number of |destination|, or -1 if it does not exist. |
227 virtual int GetNamedDestinationPage(const std::string& destination) = 0; | 227 virtual int GetNamedDestinationPage(const std::string& destination) = 0; |
228 // Gets the index of the first visible page, or -1 if none are visible. | 228 // Gets the index of the first visible page, or -1 if none are visible. |
229 virtual int GetFirstVisiblePage() = 0; | 229 virtual int GetFirstVisiblePage() = 0; |
230 // Gets the index of the most visible page, or -1 if none are visible. | 230 // Gets the index of the most visible page, or -1 if none are visible. |
231 virtual int GetMostVisiblePage() = 0; | 231 virtual int GetMostVisiblePage() = 0; |
232 // Gets the rectangle of the page including shadow. | 232 // Gets the rectangle of the page including shadow. |
233 virtual pp::Rect GetPageRect(int index) = 0; | 233 virtual pp::Rect GetPageRect(int index) = 0; |
234 // Gets the rectangle of the page excluding any additional areas. | 234 // Gets the rectangle of the page excluding any additional areas. |
235 virtual pp::Rect GetPageContentsRect(int index) = 0; | 235 virtual pp::Rect GetPageContentsRect(int index) = 0; |
| 236 // Returns a page's rect in screen coordinates, as well as its surrounding |
| 237 // border areas and bottom separator. |
| 238 virtual pp::Rect GetPageScreenRect(int page_index) const = 0; |
236 // Gets the offset of the vertical scrollbar from the top in document | 239 // Gets the offset of the vertical scrollbar from the top in document |
237 // coordinates. | 240 // coordinates. |
238 virtual int GetVerticalScrollbarYPosition() = 0; | 241 virtual int GetVerticalScrollbarYPosition() = 0; |
239 // Paints page thumbnail to the ImageData. | 242 // Paints page thumbnail to the ImageData. |
240 virtual void PaintThumbnail(pp::ImageData* image_data, int index) = 0; | 243 virtual void PaintThumbnail(pp::ImageData* image_data, int index) = 0; |
241 // Set color / grayscale rendering modes. | 244 // Set color / grayscale rendering modes. |
242 virtual void SetGrayscale(bool grayscale) = 0; | 245 virtual void SetGrayscale(bool grayscale) = 0; |
243 // Callback for timer that's set with ScheduleCallback(). | 246 // Callback for timer that's set with ScheduleCallback(). |
244 virtual void OnCallback(int id) = 0; | 247 virtual void OnCallback(int id) = 0; |
245 // Gets the JSON representation of the PDF file | 248 // Gets the JSON representation of the PDF file |
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
330 | 333 |
331 // See the definition of GetPDFPageSizeByIndex in pdf.cc for details. | 334 // See the definition of GetPDFPageSizeByIndex in pdf.cc for details. |
332 virtual bool GetPDFPageSizeByIndex(const void* pdf_buffer, | 335 virtual bool GetPDFPageSizeByIndex(const void* pdf_buffer, |
333 int pdf_buffer_size, int page_number, | 336 int pdf_buffer_size, int page_number, |
334 double* width, double* height) = 0; | 337 double* width, double* height) = 0; |
335 }; | 338 }; |
336 | 339 |
337 } // namespace chrome_pdf | 340 } // namespace chrome_pdf |
338 | 341 |
339 #endif // PDF_PDF_ENGINE_H_ | 342 #endif // PDF_PDF_ENGINE_H_ |
OLD | NEW |