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

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

Issue 517193003: More System Dialog printing code disabled on Windows. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@522493002
Patch Set: Mon Sep 8 01:10:20 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(DISABLE_BASIC_PRINTING)
78 bool PrintViewManagerBase::PrintNow() { 79 bool PrintViewManagerBase::PrintNow() {
79 return PrintNowInternal(new PrintMsg_PrintPages(routing_id())); 80 return PrintNowInternal(new PrintMsg_PrintPages(routing_id()));
80 } 81 }
82 #endif // !DISABLE_BASIC_PRINTING
81 83
82 void PrintViewManagerBase::UpdateScriptedPrintingBlocked() { 84 void PrintViewManagerBase::UpdateScriptedPrintingBlocked() {
83 Send(new PrintMsg_SetScriptedPrintingBlocked( 85 Send(new PrintMsg_SetScriptedPrintingBlocked(
84 routing_id(), 86 routing_id(),
85 !printing_enabled_.GetValue())); 87 !printing_enabled_.GetValue()));
86 } 88 }
87 89
88 void PrintViewManagerBase::NavigationStopped() { 90 void PrintViewManagerBase::NavigationStopped() {
89 // Cancel the current job, wait for the worker to finish. 91 // Cancel the current job, wait for the worker to finish.
90 TerminatePrintJob(true); 92 TerminatePrintJob(true);
(...skipping 470 matching lines...) Expand 10 before | Expand all | Expand 10 after
561 scoped_refptr<printing::PrinterQuery> printer_query; 563 scoped_refptr<printing::PrinterQuery> printer_query;
562 printer_query = queue_->PopPrinterQuery(cookie); 564 printer_query = queue_->PopPrinterQuery(cookie);
563 if (!printer_query.get()) 565 if (!printer_query.get())
564 return; 566 return;
565 BrowserThread::PostTask( 567 BrowserThread::PostTask(
566 BrowserThread::IO, FROM_HERE, 568 BrowserThread::IO, FROM_HERE,
567 base::Bind(&PrinterQuery::StopWorker, printer_query.get())); 569 base::Bind(&PrinterQuery::StopWorker, printer_query.get()));
568 } 570 }
569 571
570 } // namespace printing 572 } // namespace printing
OLDNEW
« no previous file with comments | « chrome/browser/printing/print_view_manager_base.h ('k') | chrome/browser/ui/browser_command_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698