| OLD | NEW |
| 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 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 "app/l10n_util.h" | 7 #include "app/l10n_util.h" |
| 8 #include "base/scoped_ptr.h" | 8 #include "base/scoped_ptr.h" |
| 9 #include "chrome/browser/browser_process.h" | 9 #include "chrome/browser/browser_process.h" |
| 10 #include "chrome/browser/printing/print_job.h" | 10 #include "chrome/browser/printing/print_job.h" |
| (...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 128 NOTREACHED() << "Invalid metafile header"; | 128 NOTREACHED() << "Invalid metafile header"; |
| 129 owner_.Stop(); | 129 owner_.Stop(); |
| 130 return; | 130 return; |
| 131 } | 131 } |
| 132 | 132 |
| 133 // Update the rendered document. It will send notifications to the listener. | 133 // Update the rendered document. It will send notifications to the listener. |
| 134 document->SetPage(params.page_number, | 134 document->SetPage(params.page_number, |
| 135 metafile.release(), | 135 metafile.release(), |
| 136 params.actual_shrink, | 136 params.actual_shrink, |
| 137 params.page_size, | 137 params.page_size, |
| 138 params.content_area); | 138 params.content_area, |
| 139 params.has_visible_overlays); |
| 139 #endif | 140 #endif |
| 140 ShouldQuitFromInnerMessageLoop(); | 141 ShouldQuitFromInnerMessageLoop(); |
| 141 } | 142 } |
| 142 | 143 |
| 143 void PrintViewManager::Observe(NotificationType type, | 144 void PrintViewManager::Observe(NotificationType type, |
| 144 const NotificationSource& source, | 145 const NotificationSource& source, |
| 145 const NotificationDetails& details) { | 146 const NotificationDetails& details) { |
| 146 switch (type.value) { | 147 switch (type.value) { |
| 147 case NotificationType::PRINT_JOB_EVENT: { | 148 case NotificationType::PRINT_JOB_EVENT: { |
| 148 OnNotifyPrintJobEvent(*Details<JobEventDetails>(details).ptr()); | 149 OnNotifyPrintJobEvent(*Details<JobEventDetails>(details).ptr()); |
| (...skipping 264 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 413 return false; | 414 return false; |
| 414 } | 415 } |
| 415 | 416 |
| 416 // Settings are already loaded. Go ahead. This will set | 417 // Settings are already loaded. Go ahead. This will set |
| 417 // print_job_->is_job_pending() to true. | 418 // print_job_->is_job_pending() to true. |
| 418 print_job_->StartPrinting(); | 419 print_job_->StartPrinting(); |
| 419 return true; | 420 return true; |
| 420 } | 421 } |
| 421 | 422 |
| 422 } // namespace printing | 423 } // namespace printing |
| OLD | NEW |