Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(407)

Side by Side Diff: chrome/browser/printing/print_view_manager.cc

Issue 39022: Convert NavigationEntry title to string16. TabContents::GetTitle no longer ne... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « chrome/browser/navigation_entry_unittest.cc ('k') | chrome/browser/tab_contents/navigation_controller.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698