| 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; | |
| 239 // Gets the offset of the vertical scrollbar from the top in document | 236 // Gets the offset of the vertical scrollbar from the top in document |
| 240 // coordinates. | 237 // coordinates. |
| 241 virtual int GetVerticalScrollbarYPosition() = 0; | 238 virtual int GetVerticalScrollbarYPosition() = 0; |
| 242 // Paints page thumbnail to the ImageData. | 239 // Paints page thumbnail to the ImageData. |
| 243 virtual void PaintThumbnail(pp::ImageData* image_data, int index) = 0; | 240 virtual void PaintThumbnail(pp::ImageData* image_data, int index) = 0; |
| 244 // Set color / grayscale rendering modes. | 241 // Set color / grayscale rendering modes. |
| 245 virtual void SetGrayscale(bool grayscale) = 0; | 242 virtual void SetGrayscale(bool grayscale) = 0; |
| 246 // Callback for timer that's set with ScheduleCallback(). | 243 // Callback for timer that's set with ScheduleCallback(). |
| 247 virtual void OnCallback(int id) = 0; | 244 virtual void OnCallback(int id) = 0; |
| 248 // Gets the JSON representation of the PDF file | 245 // Gets the JSON representation of the PDF file |
| (...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 333 | 330 |
| 334 // See the definition of GetPDFPageSizeByIndex in pdf.cc for details. | 331 // See the definition of GetPDFPageSizeByIndex in pdf.cc for details. |
| 335 virtual bool GetPDFPageSizeByIndex(const void* pdf_buffer, | 332 virtual bool GetPDFPageSizeByIndex(const void* pdf_buffer, |
| 336 int pdf_buffer_size, int page_number, | 333 int pdf_buffer_size, int page_number, |
| 337 double* width, double* height) = 0; | 334 double* width, double* height) = 0; |
| 338 }; | 335 }; |
| 339 | 336 |
| 340 } // namespace chrome_pdf | 337 } // namespace chrome_pdf |
| 341 | 338 |
| 342 #endif // PDF_PDF_ENGINE_H_ | 339 #endif // PDF_PDF_ENGINE_H_ |
| OLD | NEW |