| 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 <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include "build/build_config.h" | 10 #include "build/build_config.h" |
| 11 | 11 |
| 12 #if defined(OS_WIN) | 12 #if defined(OS_WIN) |
| 13 #include <windows.h> | 13 #include <windows.h> |
| 14 #endif | 14 #endif |
| 15 | 15 |
| 16 #include <memory> |
| 16 #include <string> | 17 #include <string> |
| 17 #include <vector> | 18 #include <vector> |
| 18 | 19 |
| 19 #include "base/strings/string16.h" | 20 #include "base/strings/string16.h" |
| 20 | 21 |
| 21 #include "ppapi/c/dev/pp_cursor_type_dev.h" | 22 #include "ppapi/c/dev/pp_cursor_type_dev.h" |
| 22 #include "ppapi/c/dev/ppp_printing_dev.h" | 23 #include "ppapi/c/dev/ppp_printing_dev.h" |
| 23 #include "ppapi/c/ppb_input_event.h" | 24 #include "ppapi/c/ppb_input_event.h" |
| 24 #include "ppapi/cpp/completion_callback.h" | 25 #include "ppapi/cpp/completion_callback.h" |
| 25 #include "ppapi/cpp/image_data.h" | 26 #include "ppapi/cpp/image_data.h" |
| (...skipping 156 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 182 virtual bool IsPrintPreview() = 0; | 183 virtual bool IsPrintPreview() = 0; |
| 183 | 184 |
| 184 // Get the background color of the PDF. | 185 // Get the background color of the PDF. |
| 185 virtual uint32_t GetBackgroundColor() = 0; | 186 virtual uint32_t GetBackgroundColor() = 0; |
| 186 | 187 |
| 187 // Sets selection status. | 188 // Sets selection status. |
| 188 virtual void IsSelectingChanged(bool is_selecting) {} | 189 virtual void IsSelectingChanged(bool is_selecting) {} |
| 189 }; | 190 }; |
| 190 | 191 |
| 191 // Factory method to create an instance of the PDF Engine. | 192 // Factory method to create an instance of the PDF Engine. |
| 192 static PDFEngine* Create(Client* client); | 193 static std::unique_ptr<PDFEngine> Create(Client* client); |
| 193 | 194 |
| 194 virtual ~PDFEngine() {} | 195 virtual ~PDFEngine() {} |
| 195 | 196 |
| 196 // Most of these functions are similar to the Pepper functions of the same | 197 // Most of these functions are similar to the Pepper functions of the same |
| 197 // name, so not repeating the description here unless it's different. | 198 // name, so not repeating the description here unless it's different. |
| 198 virtual bool New(const char* url, const char* headers) = 0; | 199 virtual bool New(const char* url, const char* headers) = 0; |
| 199 virtual void PageOffsetUpdated(const pp::Point& page_offset) = 0; | 200 virtual void PageOffsetUpdated(const pp::Point& page_offset) = 0; |
| 200 virtual void PluginSizeUpdated(const pp::Size& size) = 0; | 201 virtual void PluginSizeUpdated(const pp::Size& size) = 0; |
| 201 virtual void ScrolledToXPosition(int position) = 0; | 202 virtual void ScrolledToXPosition(int position) = 0; |
| 202 virtual void ScrolledToYPosition(int position) = 0; | 203 virtual void ScrolledToYPosition(int position) = 0; |
| (...skipping 158 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 361 virtual bool GetPDFPageSizeByIndex(const void* pdf_buffer, | 362 virtual bool GetPDFPageSizeByIndex(const void* pdf_buffer, |
| 362 int pdf_buffer_size, | 363 int pdf_buffer_size, |
| 363 int page_number, | 364 int page_number, |
| 364 double* width, | 365 double* width, |
| 365 double* height) = 0; | 366 double* height) = 0; |
| 366 }; | 367 }; |
| 367 | 368 |
| 368 } // namespace chrome_pdf | 369 } // namespace chrome_pdf |
| 369 | 370 |
| 370 #endif // PDF_PDF_ENGINE_H_ | 371 #endif // PDF_PDF_ENGINE_H_ |
| OLD | NEW |