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

Side by Side Diff: pdf/out_of_process_instance.h

Issue 865023002: Delay printing OOP PDF until loading is complete (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@simplify-scripting
Patch Set: Created 5 years, 11 months 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 218 matching lines...) Expand 10 before | Expand all | Expand 10 after
229 // Remaining area, in pixels, to render the pdf in after accounting for 229 // Remaining area, in pixels, to render the pdf in after accounting for
230 // horizontal centering. 230 // horizontal centering.
231 pp::Rect available_area_; 231 pp::Rect available_area_;
232 // Size of entire document in pixels (i.e. if each page is 800 pixels high and 232 // Size of entire document in pixels (i.e. if each page is 800 pixels high and
233 // there are 10 pages, the height will be 8000). 233 // there are 10 pages, the height will be 8000).
234 pp::Size document_size_; 234 pp::Size document_size_;
235 235
236 double zoom_; // Current zoom factor. 236 double zoom_; // Current zoom factor.
237 237
238 float device_scale_; // Current device scale factor. 238 float device_scale_; // Current device scale factor.
239 bool printing_enabled_;
240 // True if the plugin is full-page. 239 // True if the plugin is full-page.
241 bool full_; 240 bool full_;
242 241
243 PaintManager paint_manager_; 242 PaintManager paint_manager_;
244 243
245 struct BackgroundPart { 244 struct BackgroundPart {
246 pp::Rect location; 245 pp::Rect location;
247 uint32 color; 246 uint32 color;
248 }; 247 };
249 std::vector<BackgroundPart> background_parts_; 248 std::vector<BackgroundPart> background_parts_;
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after
333 // If true, this means we told the RenderView that we're starting a network 332 // If true, this means we told the RenderView that we're starting a network
334 // request so that it can start the throbber. We will tell it again once the 333 // request so that it can start the throbber. We will tell it again once the
335 // document finishes loading. 334 // document finishes loading.
336 bool did_call_start_loading_; 335 bool did_call_start_loading_;
337 336
338 // If this is true, then don't scroll the plugin in response to DidChangeView 337 // If this is true, then don't scroll the plugin in response to DidChangeView
339 // messages. This will be true when the extension page is in the process of 338 // messages. This will be true when the extension page is in the process of
340 // zooming the plugin so that flickering doesn't occur while zooming. 339 // zooming the plugin so that flickering doesn't occur while zooming.
341 bool stop_scrolling_; 340 bool stop_scrolling_;
342 341
342 // If a print command comes in before the document has loaded, we set
343 // |delay_print_| to true and print after the document has loaded.
344 bool delay_print_;
345
343 // The callback for receiving the password from the page. 346 // The callback for receiving the password from the page.
344 scoped_ptr<pp::CompletionCallbackWithOutput<pp::Var> > password_callback_; 347 scoped_ptr<pp::CompletionCallbackWithOutput<pp::Var> > password_callback_;
345 }; 348 };
346 349
347 } // namespace chrome_pdf 350 } // namespace chrome_pdf
348 351
349 #endif // PDF_OUT_OF_PROCESS_INSTANCE_H_ 352 #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