summaryrefslogtreecommitdiffstats
path: root/printing
diff options
context:
space:
mode:
authorpeter@pcc.me.uk <peter@pcc.me.uk@0039d316-1c4b-4281-b951-d872f2087c98>2012-02-14 03:58:06 +0000
committerpeter@pcc.me.uk <peter@pcc.me.uk@0039d316-1c4b-4281-b951-d872f2087c98>2012-02-14 03:58:06 +0000
commit437f9d8f59d8891eb20f3a5b83976b0d1b107464 (patch)
tree4432d4b9820d8e5428fb1248882c541220ae28a8 /printing
parent6f0db2b2c15a0919bbeeb6568c69b7196b186d27 (diff)
downloadchromium_src-437f9d8f59d8891eb20f3a5b83976b0d1b107464.zip
chromium_src-437f9d8f59d8891eb20f3a5b83976b0d1b107464.tar.gz
chromium_src-437f9d8f59d8891eb20f3a5b83976b0d1b107464.tar.bz2
GTK: implement "print selection".
BUG=83481 TEST=mouse select text from http://en.wikipedia.org/wiki/Main_Page Toolbox -> Print -> Print to File -> Selection -> Print, verify that PDF contains only selection. Toolbox -> Print -> Print to File -> All Pages -> Print, verify that PDF contains all pages. Toolbox -> Print -> Print to File -> Pages: 1 -> Print, verify that PDF contains only page 1. Review URL: http://codereview.chromium.org/9379039 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@121844 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'printing')
-rw-r--r--printing/print_dialog_gtk_interface.h3
-rw-r--r--printing/printing_context_gtk.cc4
2 files changed, 4 insertions, 3 deletions
diff --git a/printing/print_dialog_gtk_interface.h b/printing/print_dialog_gtk_interface.h
index b63076e..41fafe0 100644
--- a/printing/print_dialog_gtk_interface.h
+++ b/printing/print_dialog_gtk_interface.h
@@ -1,4 +1,4 @@
-// Copyright (c) 2011 The Chromium Authors. All rights reserved.
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -32,6 +32,7 @@ class PrintDialogGtkInterface {
// Shows the dialog and handles the response with |callback|. Only used when
// printing with the native print dialog.
virtual void ShowDialog(
+ bool has_selection,
const PrintingContextGtk::PrintSettingsCallback& callback) = 0;
// Prints the document named |document_name| contained in |metafile|.
diff --git a/printing/printing_context_gtk.cc b/printing/printing_context_gtk.cc
index af97906..2e06c02 100644
--- a/printing/printing_context_gtk.cc
+++ b/printing/printing_context_gtk.cc
@@ -1,4 +1,4 @@
-// Copyright (c) 2011 The Chromium Authors. All rights reserved.
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -62,7 +62,7 @@ void PrintingContextGtk::AskUserForSettings(
int max_pages,
bool has_selection,
const PrintSettingsCallback& callback) {
- print_dialog_->ShowDialog(callback);
+ print_dialog_->ShowDialog(has_selection, callback);
}
PrintingContext::Result PrintingContextGtk::UseDefaultSettings() {