| 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 "chrome/browser/browser_process.h" | 7 #include "chrome/browser/browser_process.h" |
| 8 #include "chrome/browser/printing/print_job.h" | 8 #include "chrome/browser/printing/print_job.h" |
| 9 #include "chrome/browser/printing/print_job_manager.h" | 9 #include "chrome/browser/printing/print_job_manager.h" |
| 10 #include "chrome/browser/printing/printed_document.h" | 10 #include "chrome/browser/printing/printed_document.h" |
| (...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 111 owner_.Stop(); | 111 owner_.Stop(); |
| 112 return; | 112 return; |
| 113 } | 113 } |
| 114 | 114 |
| 115 // Update the rendered document. It will send notifications to the listener. | 115 // Update the rendered document. It will send notifications to the listener. |
| 116 document->SetPage(params.page_number, emf, params.actual_shrink); | 116 document->SetPage(params.page_number, emf, params.actual_shrink); |
| 117 ShouldQuitFromInnerMessageLoop(); | 117 ShouldQuitFromInnerMessageLoop(); |
| 118 } | 118 } |
| 119 | 119 |
| 120 std::wstring PrintViewManager::RenderSourceName() { | 120 std::wstring PrintViewManager::RenderSourceName() { |
| 121 std::wstring name(owner_.GetTitle()); | 121 std::wstring name(UTF16ToWideHack(owner_.GetTitle())); |
| 122 if (name.empty()) | 122 if (name.empty()) |
| 123 name = l10n_util::GetString(IDS_DEFAULT_PRINT_DOCUMENT_TITLE); | 123 name = l10n_util::GetString(IDS_DEFAULT_PRINT_DOCUMENT_TITLE); |
| 124 return name; | 124 return name; |
| 125 } | 125 } |
| 126 | 126 |
| 127 GURL PrintViewManager::RenderSourceUrl() { | 127 GURL PrintViewManager::RenderSourceUrl() { |
| 128 NavigationEntry* entry = owner_.controller()->GetActiveEntry(); | 128 NavigationEntry* entry = owner_.controller()->GetActiveEntry(); |
| 129 if (entry) | 129 if (entry) |
| 130 return entry->display_url(); | 130 return entry->display_url(); |
| 131 else | 131 else |
| (...skipping 268 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 400 } | 400 } |
| 401 | 401 |
| 402 // Settings are already loaded. Go ahead. This will set | 402 // Settings are already loaded. Go ahead. This will set |
| 403 // print_job_->is_job_pending() to true. | 403 // print_job_->is_job_pending() to true. |
| 404 print_job_->StartPrinting(); | 404 print_job_->StartPrinting(); |
| 405 return true; | 405 return true; |
| 406 } | 406 } |
| 407 | 407 |
| 408 } // namespace printing | 408 } // namespace printing |
| 409 | 409 |
| OLD | NEW |