Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(209)

Side by Side Diff: pdf/out_of_process_instance.h

Issue 685923002: Support non-integer scroll offsets being passed to the PDF plugin. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | pdf/out_of_process_instance.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 <queue> 8 #include <queue>
9 #include <set> 9 #include <set>
10 #include <string> 10 #include <string>
(...skipping 187 matching lines...) Expand 10 before | Expand all | Expand 10 after
198 // Process the preview page data information. |src_url| specifies the preview 198 // Process the preview page data information. |src_url| specifies the preview
199 // page data location. The |src_url| is in the format: 199 // page data location. The |src_url| is in the format:
200 // chrome://print/id/page_number/print.pdf 200 // chrome://print/id/page_number/print.pdf
201 // |dst_page_index| specifies the blank page index that needs to be replaced 201 // |dst_page_index| specifies the blank page index that needs to be replaced
202 // with the new page data. 202 // with the new page data.
203 void ProcessPreviewPageInfo(const std::string& src_url, int dst_page_index); 203 void ProcessPreviewPageInfo(const std::string& src_url, int dst_page_index);
204 // Load the next available preview page into the blank page. 204 // Load the next available preview page into the blank page.
205 void LoadAvailablePreviewPage(); 205 void LoadAvailablePreviewPage();
206 206
207 // Bound the given scroll offset to the document. 207 // Bound the given scroll offset to the document.
208 pp::Point BoundScrollOffsetToDocument(const pp::Point& scroll_offset); 208 pp::FloatPoint BoundScrollOffsetToDocument(
209 const pp::FloatPoint& scroll_offset);
209 210
210 pp::ImageData image_data_; 211 pp::ImageData image_data_;
211 // Used when the plugin is embedded in a page and we have to create the loader 212 // Used when the plugin is embedded in a page and we have to create the loader
212 // ourself. 213 // ourself.
213 pp::CompletionCallbackFactory<OutOfProcessInstance> loader_factory_; 214 pp::CompletionCallbackFactory<OutOfProcessInstance> loader_factory_;
214 pp::URLLoader embed_loader_; 215 pp::URLLoader embed_loader_;
215 pp::URLLoader embed_preview_loader_; 216 pp::URLLoader embed_preview_loader_;
216 217
217 PP_CursorType_Dev cursor_; // The current cursor. 218 PP_CursorType_Dev cursor_; // The current cursor.
218 219
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after
336 // zooming the plugin so that flickering doesn't occur while zooming. 337 // zooming the plugin so that flickering doesn't occur while zooming.
337 bool stop_scrolling_; 338 bool stop_scrolling_;
338 339
339 // The callback for receiving the password from the page. 340 // The callback for receiving the password from the page.
340 scoped_ptr<pp::CompletionCallbackWithOutput<pp::Var> > password_callback_; 341 scoped_ptr<pp::CompletionCallbackWithOutput<pp::Var> > password_callback_;
341 }; 342 };
342 343
343 } // namespace chrome_pdf 344 } // namespace chrome_pdf
344 345
345 #endif // PDF_OUT_OF_PROCESS_INSTANCE_H_ 346 #endif // PDF_OUT_OF_PROCESS_INSTANCE_H_
OLDNEW
« no previous file with comments | « no previous file | pdf/out_of_process_instance.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698