OLD | NEW |
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 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
62 base::Unretained(this))); | 62 base::Unretained(this))); |
63 } | 63 } |
64 | 64 |
65 PrintViewManagerBase::~PrintViewManagerBase() { | 65 PrintViewManagerBase::~PrintViewManagerBase() { |
66 ReleasePrinterQuery(); | 66 ReleasePrinterQuery(); |
67 DisconnectFromCurrentPrintJob(); | 67 DisconnectFromCurrentPrintJob(); |
68 } | 68 } |
69 | 69 |
70 #if defined(ENABLE_BASIC_PRINTING) | 70 #if defined(ENABLE_BASIC_PRINTING) |
71 bool PrintViewManagerBase::PrintNow() { | 71 bool PrintViewManagerBase::PrintNow() { |
| 72 LOG(INFO) << "DGN PrintNow - rounting_id: " << routing_id(); |
72 return PrintNowInternal(new PrintMsg_PrintPages(routing_id())); | 73 return PrintNowInternal(new PrintMsg_PrintPages(routing_id())); |
73 } | 74 } |
74 #endif // ENABLE_BASIC_PRINTING | 75 #endif // ENABLE_BASIC_PRINTING |
75 | 76 |
76 void PrintViewManagerBase::UpdateScriptedPrintingBlocked() { | 77 void PrintViewManagerBase::UpdateScriptedPrintingBlocked() { |
77 Send(new PrintMsg_SetScriptedPrintingBlocked( | 78 Send(new PrintMsg_SetScriptedPrintingBlocked( |
78 routing_id(), | 79 routing_id(), |
79 !printing_enabled_.GetValue())); | 80 !printing_enabled_.GetValue())); |
80 } | 81 } |
81 | 82 |
(...skipping 433 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
515 scoped_refptr<printing::PrinterQuery> printer_query; | 516 scoped_refptr<printing::PrinterQuery> printer_query; |
516 printer_query = queue_->PopPrinterQuery(cookie); | 517 printer_query = queue_->PopPrinterQuery(cookie); |
517 if (!printer_query.get()) | 518 if (!printer_query.get()) |
518 return; | 519 return; |
519 BrowserThread::PostTask( | 520 BrowserThread::PostTask( |
520 BrowserThread::IO, FROM_HERE, | 521 BrowserThread::IO, FROM_HERE, |
521 base::Bind(&PrinterQuery::StopWorker, printer_query.get())); | 522 base::Bind(&PrinterQuery::StopWorker, printer_query.get())); |
522 } | 523 } |
523 | 524 |
524 } // namespace printing | 525 } // namespace printing |
OLD | NEW |