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 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
221 // Size, in pixels, of plugin rectangle. | 223 // Size, in pixels, of plugin rectangle. |
222 pp::Size plugin_size_; | 224 pp::Size plugin_size_; |
223 // Size, in DIPs, of plugin rectangle. | 225 // Size, in DIPs, of plugin rectangle. |
224 pp::Size plugin_dip_size_; | 226 pp::Size plugin_dip_size_; |
225 // Remaining area, in pixels, to render the pdf in after accounting for | 227 // Remaining area, in pixels, to render the pdf in after accounting for |
226 // horizontal centering. | 228 // horizontal centering. |
227 pp::Rect available_area_; | 229 pp::Rect available_area_; |
228 // Size of entire document in pixels (i.e. if each page is 800 pixels high and | 230 // Size of entire document in pixels (i.e. if each page is 800 pixels high and |
229 // there are 10 pages, the height will be 8000). | 231 // there are 10 pages, the height will be 8000). |
230 pp::Size document_size_; | 232 pp::Size document_size_; |
| 233 // The scroll offset in CSS pixels. |
| 234 pp::Point scroll_offset_; |
231 | 235 |
232 // Enumeration of pinch states. | 236 // Enumeration of pinch states. |
233 // This should match PinchPhase enum in | 237 // This should match PinchPhase enum in |
234 // chrome/browser/resources/pdf/viewport.js | 238 // chrome/browser/resources/pdf/viewport.js |
235 enum PinchPhase { | 239 enum PinchPhase { |
236 PINCH_NONE = 0, | 240 PINCH_NONE = 0, |
237 PINCH_START = 1, | 241 PINCH_START = 1, |
238 PINCH_UPDATE_ZOOM_OUT = 2, | 242 PINCH_UPDATE_ZOOM_OUT = 2, |
239 PINCH_UPDATE_ZOOM_IN = 3, | 243 PINCH_UPDATE_ZOOM_IN = 3, |
240 PINCH_END = 4 | 244 PINCH_END = 4 |
(...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
378 | 382 |
379 // True if the plugin is loaded in print preview, otherwise false. | 383 // True if the plugin is loaded in print preview, otherwise false. |
380 bool is_print_preview_; | 384 bool is_print_preview_; |
381 | 385 |
382 DISALLOW_COPY_AND_ASSIGN(OutOfProcessInstance); | 386 DISALLOW_COPY_AND_ASSIGN(OutOfProcessInstance); |
383 }; | 387 }; |
384 | 388 |
385 } // namespace chrome_pdf | 389 } // namespace chrome_pdf |
386 | 390 |
387 #endif // PDF_OUT_OF_PROCESS_INSTANCE_H_ | 391 #endif // PDF_OUT_OF_PROCESS_INSTANCE_H_ |
OLD | NEW |