| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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.h" | 5 #include "chrome/browser/printing/print_view_manager.h" |
| 6 | 6 |
| 7 #include <map> | 7 #include <map> |
| 8 | 8 |
| 9 #include "base/bind.h" | 9 #include "base/bind.h" |
| 10 #include "base/lazy_instance.h" | 10 #include "base/lazy_instance.h" |
| (...skipping 243 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 254 | 254 |
| 255 ShouldQuitFromInnerMessageLoop(); | 255 ShouldQuitFromInnerMessageLoop(); |
| 256 } | 256 } |
| 257 | 257 |
| 258 void PrintViewManager::OnPrintingFailed(int cookie) { | 258 void PrintViewManager::OnPrintingFailed(int cookie) { |
| 259 if (cookie != cookie_) { | 259 if (cookie != cookie_) { |
| 260 NOTREACHED(); | 260 NOTREACHED(); |
| 261 return; | 261 return; |
| 262 } | 262 } |
| 263 | 263 |
| 264 browser::ShowPrintErrorDialog( | 264 chrome::ShowPrintErrorDialog( |
| 265 tab_->web_contents()->GetView()->GetTopLevelNativeWindow()); | 265 tab_->web_contents()->GetView()->GetTopLevelNativeWindow()); |
| 266 | 266 |
| 267 ReleasePrinterQuery(); | 267 ReleasePrinterQuery(); |
| 268 | 268 |
| 269 content::NotificationService::current()->Notify( | 269 content::NotificationService::current()->Notify( |
| 270 chrome::NOTIFICATION_PRINT_JOB_RELEASED, | 270 chrome::NOTIFICATION_PRINT_JOB_RELEASED, |
| 271 content::Source<TabContents>(tab_), | 271 content::Source<TabContents>(tab_), |
| 272 content::NotificationService::NoDetails()); | 272 content::NotificationService::NoDetails()); |
| 273 } | 273 } |
| 274 | 274 |
| (...skipping 358 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 633 scoped_refptr<printing::PrinterQuery> printer_query; | 633 scoped_refptr<printing::PrinterQuery> printer_query; |
| 634 print_job_manager->PopPrinterQuery(cookie, &printer_query); | 634 print_job_manager->PopPrinterQuery(cookie, &printer_query); |
| 635 if (!printer_query.get()) | 635 if (!printer_query.get()) |
| 636 return; | 636 return; |
| 637 BrowserThread::PostTask( | 637 BrowserThread::PostTask( |
| 638 BrowserThread::IO, FROM_HERE, | 638 BrowserThread::IO, FROM_HERE, |
| 639 base::Bind(&PrinterQuery::StopWorker, printer_query.get())); | 639 base::Bind(&PrinterQuery::StopWorker, printer_query.get())); |
| 640 } | 640 } |
| 641 | 641 |
| 642 } // namespace printing | 642 } // namespace printing |
| OLD | NEW |