| 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_OUT_OF_PROCESS_INSTANCE_H_ | 5 #ifndef PDF_OUT_OF_PROCESS_INSTANCE_H_ |
| 6 #define PDF_OUT_OF_PROCESS_INSTANCE_H_ | 6 #define PDF_OUT_OF_PROCESS_INSTANCE_H_ |
| 7 | 7 |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 #include <string.h> | 9 #include <string.h> |
| 10 | 10 |
| (...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 77 pp::Var GetLinkAtPosition(const pp::Point& point); | 77 pp::Var GetLinkAtPosition(const pp::Point& point); |
| 78 void GetPrintPresetOptionsFromDocument(PP_PdfPrintPresetOptions_Dev* options); | 78 void GetPrintPresetOptionsFromDocument(PP_PdfPrintPresetOptions_Dev* options); |
| 79 void EnableAccessibility(); | 79 void EnableAccessibility(); |
| 80 | 80 |
| 81 void FlushCallback(int32_t result); | 81 void FlushCallback(int32_t result); |
| 82 void DidOpen(int32_t result); | 82 void DidOpen(int32_t result); |
| 83 void DidOpenPreview(int32_t result); | 83 void DidOpenPreview(int32_t result); |
| 84 | 84 |
| 85 // Called when the timer is fired. | 85 // Called when the timer is fired. |
| 86 void OnClientTimerFired(int32_t id); | 86 void OnClientTimerFired(int32_t id); |
| 87 void OnClientTouchTimerFired(int32_t id); |
| 87 | 88 |
| 88 // Called to print without re-entrancy issues. | 89 // Called to print without re-entrancy issues. |
| 89 void OnPrint(int32_t); | 90 void OnPrint(int32_t); |
| 90 | 91 |
| 91 // PDFEngine::Client implementation. | 92 // PDFEngine::Client implementation. |
| 92 void DocumentSizeUpdated(const pp::Size& size) override; | 93 void DocumentSizeUpdated(const pp::Size& size) override; |
| 93 void Invalidate(const pp::Rect& rect) override; | 94 void Invalidate(const pp::Rect& rect) override; |
| 94 void Scroll(const pp::Point& point) override; | 95 void Scroll(const pp::Point& point) override; |
| 95 void ScrollToX(int position) override; | 96 void ScrollToX(int position) override; |
| 96 void ScrollToY(int position) override; | 97 void ScrollToY(int position) override; |
| (...skipping 16 matching lines...) Expand all Loading... |
| 113 const std::string& bcc, | 114 const std::string& bcc, |
| 114 const std::string& subject, | 115 const std::string& subject, |
| 115 const std::string& body) override; | 116 const std::string& body) override; |
| 116 void Print() override; | 117 void Print() override; |
| 117 void SubmitForm(const std::string& url, | 118 void SubmitForm(const std::string& url, |
| 118 const void* data, | 119 const void* data, |
| 119 int length) override; | 120 int length) override; |
| 120 std::string ShowFileSelectionDialog() override; | 121 std::string ShowFileSelectionDialog() override; |
| 121 pp::URLLoader CreateURLLoader() override; | 122 pp::URLLoader CreateURLLoader() override; |
| 122 void ScheduleCallback(int id, int delay_in_ms) override; | 123 void ScheduleCallback(int id, int delay_in_ms) override; |
| 124 void ScheduleTouchTimerCallback(int id, int delay_in_ms) override; |
| 123 void SearchString(const base::char16* string, | 125 void SearchString(const base::char16* string, |
| 124 const base::char16* term, | 126 const base::char16* term, |
| 125 bool case_sensitive, | 127 bool case_sensitive, |
| 126 std::vector<SearchStringResult>* results) override; | 128 std::vector<SearchStringResult>* results) override; |
| 127 void DocumentPaintOccurred() override; | 129 void DocumentPaintOccurred() override; |
| 128 void DocumentLoadComplete(int page_count) override; | 130 void DocumentLoadComplete(int page_count) override; |
| 129 void DocumentLoadFailed() override; | 131 void DocumentLoadFailed() override; |
| 130 void FontSubstituted() override; | 132 void FontSubstituted() override; |
| 131 pp::Instance* GetPluginInstance() override; | 133 pp::Instance* GetPluginInstance() override; |
| 132 void DocumentHasUnsupportedFeature(const std::string& feature) override; | 134 void DocumentHasUnsupportedFeature(const std::string& feature) override; |
| (...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 228 // Size, in pixels, of plugin rectangle. | 230 // Size, in pixels, of plugin rectangle. |
| 229 pp::Size plugin_size_; | 231 pp::Size plugin_size_; |
| 230 // Size, in DIPs, of plugin rectangle. | 232 // Size, in DIPs, of plugin rectangle. |
| 231 pp::Size plugin_dip_size_; | 233 pp::Size plugin_dip_size_; |
| 232 // Remaining area, in pixels, to render the pdf in after accounting for | 234 // Remaining area, in pixels, to render the pdf in after accounting for |
| 233 // horizontal centering. | 235 // horizontal centering. |
| 234 pp::Rect available_area_; | 236 pp::Rect available_area_; |
| 235 // Size of entire document in pixels (i.e. if each page is 800 pixels high and | 237 // Size of entire document in pixels (i.e. if each page is 800 pixels high and |
| 236 // there are 10 pages, the height will be 8000). | 238 // there are 10 pages, the height will be 8000). |
| 237 pp::Size document_size_; | 239 pp::Size document_size_; |
| 240 // The scroll offset |
| 241 pp::Point scroll_offset_; |
| 238 | 242 |
| 239 // Enumeration of pinch states. | 243 // Enumeration of pinch states. |
| 240 // This should match PinchPhase enum in | 244 // This should match PinchPhase enum in |
| 241 // chrome/browser/resources/pdf/viewport.js | 245 // chrome/browser/resources/pdf/viewport.js |
| 242 enum PinchPhase { | 246 enum PinchPhase { |
| 243 PINCH_NONE = 0, | 247 PINCH_NONE = 0, |
| 244 PINCH_START = 1, | 248 PINCH_START = 1, |
| 245 PINCH_UPDATE_ZOOM_OUT = 2, | 249 PINCH_UPDATE_ZOOM_OUT = 2, |
| 246 PINCH_UPDATE_ZOOM_IN = 3, | 250 PINCH_UPDATE_ZOOM_IN = 3, |
| 247 PINCH_END = 4 | 251 PINCH_END = 4 |
| (...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 387 | 391 |
| 388 // True if the plugin is loaded in print preview, otherwise false. | 392 // True if the plugin is loaded in print preview, otherwise false. |
| 389 bool is_print_preview_; | 393 bool is_print_preview_; |
| 390 | 394 |
| 391 DISALLOW_COPY_AND_ASSIGN(OutOfProcessInstance); | 395 DISALLOW_COPY_AND_ASSIGN(OutOfProcessInstance); |
| 392 }; | 396 }; |
| 393 | 397 |
| 394 } // namespace chrome_pdf | 398 } // namespace chrome_pdf |
| 395 | 399 |
| 396 #endif // PDF_OUT_OF_PROCESS_INSTANCE_H_ | 400 #endif // PDF_OUT_OF_PROCESS_INSTANCE_H_ |
| OLD | NEW |