| 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 10 matching lines...) Expand all  Loading... | 
| 21 #include "ppapi/c/ppb_input_event.h" | 21 #include "ppapi/c/ppb_input_event.h" | 
| 22 #include "ppapi/cpp/completion_callback.h" | 22 #include "ppapi/cpp/completion_callback.h" | 
| 23 #include "ppapi/cpp/image_data.h" | 23 #include "ppapi/cpp/image_data.h" | 
| 24 #include "ppapi/cpp/rect.h" | 24 #include "ppapi/cpp/rect.h" | 
| 25 #include "ppapi/cpp/size.h" | 25 #include "ppapi/cpp/size.h" | 
| 26 #include "ppapi/cpp/url_loader.h" | 26 #include "ppapi/cpp/url_loader.h" | 
| 27 #include "ppapi/cpp/var_array.h" | 27 #include "ppapi/cpp/var_array.h" | 
| 28 | 28 | 
| 29 namespace pp { | 29 namespace pp { | 
| 30 class InputEvent; | 30 class InputEvent; | 
|  | 31 class VarDictionary; | 
| 31 } | 32 } | 
| 32 | 33 | 
| 33 const uint32 kBackgroundColor = 0xFFCCCCCC; | 34 const uint32 kBackgroundColor = 0xFFCCCCCC; | 
| 34 | 35 | 
| 35 namespace chrome_pdf { | 36 namespace chrome_pdf { | 
| 36 | 37 | 
| 37 class Stream; | 38 class Stream; | 
| 38 | 39 | 
| 39 #if defined(OS_MACOSX) | 40 #if defined(OS_MACOSX) | 
| 40 const uint32 kDefaultKeyModifier = PP_INPUTEVENT_MODIFIER_METAKEY; | 41 const uint32 kDefaultKeyModifier = PP_INPUTEVENT_MODIFIER_METAKEY; | 
| (...skipping 221 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 262   // document at page |index|. | 263   // document at page |index|. | 
| 263   virtual void AppendPage(PDFEngine* engine, int index) = 0; | 264   virtual void AppendPage(PDFEngine* engine, int index) = 0; | 
| 264 | 265 | 
| 265   // Allow client to query and reset scroll positions in document coordinates. | 266   // Allow client to query and reset scroll positions in document coordinates. | 
| 266   // Note that this is meant for cases where the device scale factor changes, | 267   // Note that this is meant for cases where the device scale factor changes, | 
| 267   // and not for general scrolling - the engine will not repaint due to this. | 268   // and not for general scrolling - the engine will not repaint due to this. | 
| 268   virtual pp::Point GetScrollPosition() = 0; | 269   virtual pp::Point GetScrollPosition() = 0; | 
| 269   virtual void SetScrollPosition(const pp::Point& position) = 0; | 270   virtual void SetScrollPosition(const pp::Point& position) = 0; | 
| 270 | 271 | 
| 271   virtual bool IsProgressiveLoad() = 0; | 272   virtual bool IsProgressiveLoad() = 0; | 
|  | 273   virtual pp::VarDictionary GetNamedDestinations() = 0; | 
| 272 }; | 274 }; | 
| 273 | 275 | 
| 274 // Interface for exports that wrap the PDF engine. | 276 // Interface for exports that wrap the PDF engine. | 
| 275 class PDFEngineExports { | 277 class PDFEngineExports { | 
| 276  public: | 278  public: | 
| 277   struct RenderingSettings { | 279   struct RenderingSettings { | 
| 278    RenderingSettings(int dpi_x, | 280    RenderingSettings(int dpi_x, | 
| 279                      int dpi_y, | 281                      int dpi_y, | 
| 280                      const pp::Rect& bounds, | 282                      const pp::Rect& bounds, | 
| 281                      bool fit_to_bounds, | 283                      bool fit_to_bounds, | 
| (...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 323 | 325 | 
| 324   // See the definition of GetPDFPageSizeByIndex in pdf.cc for details. | 326   // See the definition of GetPDFPageSizeByIndex in pdf.cc for details. | 
| 325   virtual bool GetPDFPageSizeByIndex(const void* pdf_buffer, | 327   virtual bool GetPDFPageSizeByIndex(const void* pdf_buffer, | 
| 326                                      int pdf_buffer_size, int page_number, | 328                                      int pdf_buffer_size, int page_number, | 
| 327                                      double* width, double* height) = 0; | 329                                      double* width, double* height) = 0; | 
| 328 }; | 330 }; | 
| 329 | 331 | 
| 330 }  // namespace chrome_pdf | 332 }  // namespace chrome_pdf | 
| 331 | 333 | 
| 332 #endif  // PDF_PDF_ENGINE_H_ | 334 #endif  // PDF_PDF_ENGINE_H_ | 
| OLD | NEW | 
|---|