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

Unified Diff: chrome/renderer/mock_printer.cc

Issue 118338: Add support for printing selection only flag. This only adds the flag to the ... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/renderer/mock_printer.h ('k') | chrome/renderer/mock_render_thread.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/renderer/mock_printer.cc
===================================================================
--- chrome/renderer/mock_printer.cc (revision 17852)
+++ chrome/renderer/mock_printer.cc (working copy)
@@ -20,6 +20,7 @@
max_shrink_(2.0),
min_shrink_(1.25),
desired_dpi_(72),
+ selection_only_(false),
document_cookie_(-1),
current_document_cookie_(0),
printer_status_(PRINTER_READY),
@@ -49,6 +50,7 @@
params->max_shrink = max_shrink_;
params->min_shrink = min_shrink_;
params->desired_dpi = desired_dpi_;
+ params->selection_only = selection_only_;
params->document_cookie = document_cookie_;
params->printable_size.set_width(printable_width_);
params->printable_size.set_height(printable_height_);
@@ -59,12 +61,14 @@
max_shrink_ = params.max_shrink;
min_shrink_ = params.min_shrink;
desired_dpi_ = params.desired_dpi;
+ selection_only_ = params.selection_only;
printable_width_ = params.printable_size.width();
printable_height_ = params.printable_size.height();
}
void MockPrinter::ScriptedPrint(int cookie,
int expected_pages_count,
+ bool has_selection,
ViewMsg_PrintPages_Params* settings) {
// Verify the input parameters.
EXPECT_EQ(document_cookie_, cookie);
@@ -74,6 +78,7 @@
settings->params.max_shrink = max_shrink_;
settings->params.min_shrink = min_shrink_;
settings->params.desired_dpi = desired_dpi_;
+ settings->params.selection_only = selection_only_;
settings->params.document_cookie = document_cookie_;
settings->params.printable_size.set_width(printable_width_);
settings->params.printable_size.set_height(printable_height_);
« no previous file with comments | « chrome/renderer/mock_printer.h ('k') | chrome/renderer/mock_render_thread.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698