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 166 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
177 virtual uint32 GetBackgroundColor() = 0; | 177 virtual uint32 GetBackgroundColor() = 0; |
178 | 178 |
179 // Sets selection status. | 179 // Sets selection status. |
180 virtual void IsSelectingChanged(bool is_selecting) {} | 180 virtual void IsSelectingChanged(bool is_selecting) {} |
181 }; | 181 }; |
182 | 182 |
183 // Factory method to create an instance of the PDF Engine. | 183 // Factory method to create an instance of the PDF Engine. |
184 static PDFEngine* Create(Client* client); | 184 static PDFEngine* Create(Client* client); |
185 | 185 |
186 virtual ~PDFEngine() {} | 186 virtual ~PDFEngine() {} |
| 187 |
187 // Most of these functions are similar to the Pepper functions of the same | 188 // Most of these functions are similar to the Pepper functions of the same |
188 // name, so not repeating the description here unless it's different. | 189 // name, so not repeating the description here unless it's different. |
189 virtual bool New(const char* url) = 0; | 190 virtual bool New(const char* url, const char* headers) = 0; |
190 virtual bool New(const char* url, | |
191 const char* headers) = 0; | |
192 virtual void PageOffsetUpdated(const pp::Point& page_offset) = 0; | 191 virtual void PageOffsetUpdated(const pp::Point& page_offset) = 0; |
193 virtual void PluginSizeUpdated(const pp::Size& size) = 0; | 192 virtual void PluginSizeUpdated(const pp::Size& size) = 0; |
194 virtual void ScrolledToXPosition(int position) = 0; | 193 virtual void ScrolledToXPosition(int position) = 0; |
195 virtual void ScrolledToYPosition(int position) = 0; | 194 virtual void ScrolledToYPosition(int position) = 0; |
196 // Paint is called a series of times. Before these n calls are made, PrePaint | 195 // Paint is called a series of times. Before these n calls are made, PrePaint |
197 // is called once. After Paint is called n times, PostPaint is called once. | 196 // is called once. After Paint is called n times, PostPaint is called once. |
198 virtual void PrePaint() = 0; | 197 virtual void PrePaint() = 0; |
199 virtual void Paint(const pp::Rect& rect, | 198 virtual void Paint(const pp::Rect& rect, |
200 pp::ImageData* image_data, | 199 pp::ImageData* image_data, |
201 std::vector<pp::Rect>* ready, | 200 std::vector<pp::Rect>* ready, |
(...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
331 | 330 |
332 // See the definition of GetPDFPageSizeByIndex in pdf.cc for details. | 331 // See the definition of GetPDFPageSizeByIndex in pdf.cc for details. |
333 virtual bool GetPDFPageSizeByIndex(const void* pdf_buffer, | 332 virtual bool GetPDFPageSizeByIndex(const void* pdf_buffer, |
334 int pdf_buffer_size, int page_number, | 333 int pdf_buffer_size, int page_number, |
335 double* width, double* height) = 0; | 334 double* width, double* height) = 0; |
336 }; | 335 }; |
337 | 336 |
338 } // namespace chrome_pdf | 337 } // namespace chrome_pdf |
339 | 338 |
340 #endif // PDF_PDF_ENGINE_H_ | 339 #endif // PDF_PDF_ENGINE_H_ |
OLD | NEW |