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

Unified Diff: chrome/browser/printing/print_job_worker.cc

Issue 524543002: Removed IDC_PRINT_TO_DESTINATION. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fri Aug 29 14:26:26 PDT 2014 Created 6 years, 4 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/browser/printing/print_job_worker.h ('k') | chrome/browser/printing/print_view_manager.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/printing/print_job_worker.cc
diff --git a/chrome/browser/printing/print_job_worker.cc b/chrome/browser/printing/print_job_worker.cc
index 12473513de214d03c18a1a1293058cc48a2001b9..5e3c59ccc40ccb0a95f73a141277a6fe2031287b 100644
--- a/chrome/browser/printing/print_job_worker.cc
+++ b/chrome/browser/printing/print_job_worker.cc
@@ -111,11 +111,6 @@ void PrintJobWorker::SetNewOwner(PrintJobWorkerOwner* new_owner) {
owner_ = new_owner;
}
-void PrintJobWorker::SetPrintDestination(
- PrintDestinationInterface* destination) {
- destination_ = destination;
-}
-
void PrintJobWorker::GetSettings(
bool ask_user_for_settings,
int document_page_count,
@@ -134,7 +129,7 @@ void PrintJobWorker::GetSettings(
// When we delegate to a destination, we don't ask the user for settings.
// TODO(mad): Ask the destination for settings.
- if (ask_user_for_settings && destination_.get() == NULL) {
+ if (ask_user_for_settings) {
BrowserThread::PostTask(
BrowserThread::UI, FROM_HERE,
base::Bind(&HoldRefCallback, make_scoped_refptr(owner_),
@@ -277,8 +272,6 @@ void PrintJobWorker::OnNewPage() {
}
// We have enough information to initialize page_number_.
page_number_.Init(document_->settings(), page_count);
- if (destination_.get() != NULL)
- destination_->SetPageCount(page_count);
}
DCHECK_NE(page_number_, PageNumber::npos());
@@ -375,18 +368,6 @@ void PrintJobWorker::SpoolPage(PrintedPage* page) {
return;
}
- if (destination_.get() != NULL) {
- std::vector<uint8> metabytes(page->metafile()->GetDataSize());
- bool success = page->metafile()->GetData(
- reinterpret_cast<void*>(&metabytes[0]), metabytes.size());
- DCHECK(success) << "Failed to get metafile data.";
- destination_->SetPageContent(
- page->page_number(),
- reinterpret_cast<void*>(&metabytes[0]),
- metabytes.size());
- return;
- }
-
// Actual printing.
#if defined(OS_WIN) || defined(OS_MACOSX)
document_->RenderPrintedPage(*page, printing_context_->context());
« no previous file with comments | « chrome/browser/printing/print_job_worker.h ('k') | chrome/browser/printing/print_view_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698