| 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 184 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 195 } | 195 } |
| 196 | 196 |
| 197 void PrintViewManagerBase::OnShowInvalidPrinterSettingsError() { | 197 void PrintViewManagerBase::OnShowInvalidPrinterSettingsError() { |
| 198 chrome::ShowMessageBox(NULL, | 198 chrome::ShowMessageBox(NULL, |
| 199 base::string16(), | 199 base::string16(), |
| 200 l10n_util::GetStringUTF16( | 200 l10n_util::GetStringUTF16( |
| 201 IDS_PRINT_INVALID_PRINTER_SETTINGS), | 201 IDS_PRINT_INVALID_PRINTER_SETTINGS), |
| 202 chrome::MESSAGE_BOX_TYPE_WARNING); | 202 chrome::MESSAGE_BOX_TYPE_WARNING); |
| 203 } | 203 } |
| 204 | 204 |
| 205 void PrintViewManagerBase::DidStartLoading( | 205 void PrintViewManagerBase::DidStartLoading() { |
| 206 content::RenderViewHost* render_view_host) { | |
| 207 UpdateScriptedPrintingBlocked(); | 206 UpdateScriptedPrintingBlocked(); |
| 208 } | 207 } |
| 209 | 208 |
| 210 bool PrintViewManagerBase::OnMessageReceived(const IPC::Message& message) { | 209 bool PrintViewManagerBase::OnMessageReceived(const IPC::Message& message) { |
| 211 bool handled = true; | 210 bool handled = true; |
| 212 IPC_BEGIN_MESSAGE_MAP(PrintViewManagerBase, message) | 211 IPC_BEGIN_MESSAGE_MAP(PrintViewManagerBase, message) |
| 213 IPC_MESSAGE_HANDLER(PrintHostMsg_DidGetPrintedPagesCount, | 212 IPC_MESSAGE_HANDLER(PrintHostMsg_DidGetPrintedPagesCount, |
| 214 OnDidGetPrintedPagesCount) | 213 OnDidGetPrintedPagesCount) |
| 215 IPC_MESSAGE_HANDLER(PrintHostMsg_DidGetDocumentCookie, | 214 IPC_MESSAGE_HANDLER(PrintHostMsg_DidGetDocumentCookie, |
| 216 OnDidGetDocumentCookie) | 215 OnDidGetDocumentCookie) |
| (...skipping 298 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 515 scoped_refptr<printing::PrinterQuery> printer_query; | 514 scoped_refptr<printing::PrinterQuery> printer_query; |
| 516 printer_query = queue_->PopPrinterQuery(cookie); | 515 printer_query = queue_->PopPrinterQuery(cookie); |
| 517 if (!printer_query.get()) | 516 if (!printer_query.get()) |
| 518 return; | 517 return; |
| 519 BrowserThread::PostTask( | 518 BrowserThread::PostTask( |
| 520 BrowserThread::IO, FROM_HERE, | 519 BrowserThread::IO, FROM_HERE, |
| 521 base::Bind(&PrinterQuery::StopWorker, printer_query.get())); | 520 base::Bind(&PrinterQuery::StopWorker, printer_query.get())); |
| 522 } | 521 } |
| 523 | 522 |
| 524 } // namespace printing | 523 } // namespace printing |
| OLD | NEW |