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

Side by Side Diff: chrome/browser/printing/print_view_manager_base.cc

Issue 546373002: Revert of More System Dialog printing code disabled on Windows. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@522493002
Patch Set: Mon Sep 8 00:14:11 PDT 2014 Created 6 years, 3 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
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 #include "chrome/browser/printing/print_view_manager_base.h" 5 #include "chrome/browser/printing/print_view_manager_base.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/memory/scoped_ptr.h" 8 #include "base/memory/scoped_ptr.h"
9 #include "base/prefs/pref_service.h" 9 #include "base/prefs/pref_service.h"
10 #include "base/strings/utf_string_conversions.h" 10 #include "base/strings/utf_string_conversions.h"
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
68 profile->GetPrefs(), 68 profile->GetPrefs(),
69 base::Bind(&PrintViewManagerBase::UpdateScriptedPrintingBlocked, 69 base::Bind(&PrintViewManagerBase::UpdateScriptedPrintingBlocked,
70 base::Unretained(this))); 70 base::Unretained(this)));
71 } 71 }
72 72
73 PrintViewManagerBase::~PrintViewManagerBase() { 73 PrintViewManagerBase::~PrintViewManagerBase() {
74 ReleasePrinterQuery(); 74 ReleasePrinterQuery();
75 DisconnectFromCurrentPrintJob(); 75 DisconnectFromCurrentPrintJob();
76 } 76 }
77 77
78 #if !defined(OS_WIN)
79 bool PrintViewManagerBase::PrintNow() { 78 bool PrintViewManagerBase::PrintNow() {
80 return PrintNowInternal(new PrintMsg_PrintPages(routing_id())); 79 return PrintNowInternal(new PrintMsg_PrintPages(routing_id()));
81 } 80 }
82 #endif // !OS_WIN
83 81
84 void PrintViewManagerBase::UpdateScriptedPrintingBlocked() { 82 void PrintViewManagerBase::UpdateScriptedPrintingBlocked() {
85 Send(new PrintMsg_SetScriptedPrintingBlocked( 83 Send(new PrintMsg_SetScriptedPrintingBlocked(
86 routing_id(), 84 routing_id(),
87 !printing_enabled_.GetValue())); 85 !printing_enabled_.GetValue()));
88 } 86 }
89 87
90 void PrintViewManagerBase::NavigationStopped() { 88 void PrintViewManagerBase::NavigationStopped() {
91 // Cancel the current job, wait for the worker to finish. 89 // Cancel the current job, wait for the worker to finish.
92 TerminatePrintJob(true); 90 TerminatePrintJob(true);
(...skipping 470 matching lines...) Expand 10 before | Expand all | Expand 10 after
563 scoped_refptr<printing::PrinterQuery> printer_query; 561 scoped_refptr<printing::PrinterQuery> printer_query;
564 printer_query = queue_->PopPrinterQuery(cookie); 562 printer_query = queue_->PopPrinterQuery(cookie);
565 if (!printer_query.get()) 563 if (!printer_query.get())
566 return; 564 return;
567 BrowserThread::PostTask( 565 BrowserThread::PostTask(
568 BrowserThread::IO, FROM_HERE, 566 BrowserThread::IO, FROM_HERE,
569 base::Bind(&PrinterQuery::StopWorker, printer_query.get())); 567 base::Bind(&PrinterQuery::StopWorker, printer_query.get()));
570 } 568 }
571 569
572 } // namespace printing 570 } // namespace printing
OLDNEW
« no previous file with comments | « chrome/browser/printing/print_view_manager_base.h ('k') | chrome/browser/ui/webui/print_preview/print_preview_handler.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698