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 162 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
173 virtual void FormTextFieldFocusChange(bool in_focus) = 0; | 173 virtual void FormTextFieldFocusChange(bool in_focus) = 0; |
174 | 174 |
175 // Returns true if the plugin has been opened within print preview. | 175 // Returns true if the plugin has been opened within print preview. |
176 virtual bool IsPrintPreview() = 0; | 176 virtual bool IsPrintPreview() = 0; |
177 }; | 177 }; |
178 | 178 |
179 // Factory method to create an instance of the PDF Engine. | 179 // Factory method to create an instance of the PDF Engine. |
180 static PDFEngine* Create(Client* client); | 180 static PDFEngine* Create(Client* client); |
181 | 181 |
182 virtual ~PDFEngine() {} | 182 virtual ~PDFEngine() {} |
| 183 |
| 184 virtual void ClientDestroyed() {} |
| 185 |
183 // Most of these functions are similar to the Pepper functions of the same | 186 // Most of these functions are similar to the Pepper functions of the same |
184 // name, so not repeating the description here unless it's different. | 187 // name, so not repeating the description here unless it's different. |
185 virtual bool New(const char* url) = 0; | 188 virtual bool New(const char* url) = 0; |
186 virtual bool New(const char* url, | 189 virtual bool New(const char* url, |
187 const char* headers) = 0; | 190 const char* headers) = 0; |
188 virtual void PageOffsetUpdated(const pp::Point& page_offset) = 0; | 191 virtual void PageOffsetUpdated(const pp::Point& page_offset) = 0; |
189 virtual void PluginSizeUpdated(const pp::Size& size) = 0; | 192 virtual void PluginSizeUpdated(const pp::Size& size) = 0; |
190 virtual void ScrolledToXPosition(int position) = 0; | 193 virtual void ScrolledToXPosition(int position) = 0; |
191 virtual void ScrolledToYPosition(int position) = 0; | 194 virtual void ScrolledToYPosition(int position) = 0; |
192 // 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 |
(...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
313 | 316 |
314 // See the definition of GetPDFPageSizeByIndex in pdf.cc for details. | 317 // See the definition of GetPDFPageSizeByIndex in pdf.cc for details. |
315 virtual bool GetPDFPageSizeByIndex(const void* pdf_buffer, | 318 virtual bool GetPDFPageSizeByIndex(const void* pdf_buffer, |
316 int pdf_buffer_size, int page_number, | 319 int pdf_buffer_size, int page_number, |
317 double* width, double* height) = 0; | 320 double* width, double* height) = 0; |
318 }; | 321 }; |
319 | 322 |
320 } // namespace chrome_pdf | 323 } // namespace chrome_pdf |
321 | 324 |
322 #endif // PDF_PDF_ENGINE_H_ | 325 #endif // PDF_PDF_ENGINE_H_ |
OLD | NEW |