summaryrefslogtreecommitdiffstats
path: root/chrome/browser/printing
diff options
context:
space:
mode:
authorsanjeevr@chromium.org <sanjeevr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-03-12 05:29:07 +0000
committersanjeevr@chromium.org <sanjeevr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-03-12 05:29:07 +0000
commit38bba4f8e2f93dd789c3483a3f0c153ca5809793 (patch)
tree18ec7bd6d8cf84dd7492b1f986f210621a79db00 /chrome/browser/printing
parent31548a10135c11ff689074896237d2b7a404959c (diff)
downloadchromium_src-38bba4f8e2f93dd789c3483a3f0c153ca5809793.zip
chromium_src-38bba4f8e2f93dd789c3483a3f0c153ca5809793.tar.gz
chromium_src-38bba4f8e2f93dd789c3483a3f0c153ca5809793.tar.bz2
Changes made to the printing logic to allow plugins to participate in the browser's print workflow. These changes mainly involve allowing the plugin to specify
whether it wants the browser to use overlays and also changes to the EMF code on Windows to decompress JPEGs/PNGs in the metafile. The related webkit change is https://bugs.webkit.org/show_bug.cgi?id=35550 BUG=None TEST=Test printing with new Pepper plugins that support custom printing. Review URL: http://codereview.chromium.org/745001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@41400 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/printing')
-rw-r--r--chrome/browser/printing/print_job_worker.cc4
-rw-r--r--chrome/browser/printing/print_job_worker.h3
-rw-r--r--chrome/browser/printing/printer_query.cc4
-rw-r--r--chrome/browser/printing/printer_query.h1
4 files changed, 9 insertions, 3 deletions
diff --git a/chrome/browser/printing/print_job_worker.cc b/chrome/browser/printing/print_job_worker.cc
index 3a91f0c..34d14dc 100644
--- a/chrome/browser/printing/print_job_worker.cc
+++ b/chrome/browser/printing/print_job_worker.cc
@@ -67,13 +67,15 @@ void PrintJobWorker::SetNewOwner(PrintJobWorkerOwner* new_owner) {
void PrintJobWorker::GetSettings(bool ask_user_for_settings,
gfx::NativeWindow parent_window,
int document_page_count,
- bool has_selection) {
+ bool has_selection,
+ bool use_overlays) {
DCHECK_EQ(message_loop(), MessageLoop::current());
DCHECK_EQ(page_number_, PageNumber::npos());
// Recursive task processing is needed for the dialog in case it needs to be
// destroyed by a task.
MessageLoop::current()->SetNestableTasksAllowed(true);
+ printing_context_.SetUseOverlays(use_overlays);
if (ask_user_for_settings) {
#if defined(OS_MACOSX)
diff --git a/chrome/browser/printing/print_job_worker.h b/chrome/browser/printing/print_job_worker.h
index 15f16da..8eb15dd 100644
--- a/chrome/browser/printing/print_job_worker.h
+++ b/chrome/browser/printing/print_job_worker.h
@@ -36,7 +36,8 @@ class PrintJobWorker : public base::Thread {
void GetSettings(bool ask_user_for_settings,
gfx::NativeWindow parent_window,
int document_page_count,
- bool has_selection);
+ bool has_selection,
+ bool use_overlays);
// Starts the printing loop. Every pages are printed as soon as the data is
// available. Makes sure the new_document is the right one.
diff --git a/chrome/browser/printing/printer_query.cc b/chrome/browser/printing/printer_query.cc
index 4fdadbe..86c0f67 100644
--- a/chrome/browser/printing/printer_query.cc
+++ b/chrome/browser/printing/printer_query.cc
@@ -65,6 +65,7 @@ void PrinterQuery::GetSettings(GetSettingsAskParam ask_user_for_settings,
gfx::NativeWindow parent_window,
int expected_page_count,
bool has_selection,
+ bool use_overlays,
CancelableTask* callback) {
DCHECK_EQ(ui_message_loop_, MessageLoop::current());
DCHECK(!is_print_dialog_box_shown_);
@@ -93,7 +94,8 @@ void PrinterQuery::GetSettings(GetSettingsAskParam ask_user_for_settings,
is_print_dialog_box_shown_,
parent_window,
expected_page_count,
- has_selection));
+ has_selection,
+ use_overlays));
}
void PrinterQuery::StopWorker() {
diff --git a/chrome/browser/printing/printer_query.h b/chrome/browser/printing/printer_query.h
index b9c2734..847611c 100644
--- a/chrome/browser/printing/printer_query.h
+++ b/chrome/browser/printing/printer_query.h
@@ -50,6 +50,7 @@ class PrinterQuery : public PrintJobWorkerOwner {
gfx::NativeWindow parent_window,
int expected_page_count,
bool has_selection,
+ bool use_overlays,
CancelableTask* callback);
// Stops the worker thread since the client is done with this object.