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

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

Issue 18339006: Rename RenderViewGone IPC/methods to better reflect reality (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixes for reviews by creis@ and palmer@. Created 7 years, 5 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) 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/command_line.h" 10 #include "base/command_line.h"
(...skipping 166 matching lines...) Expand 10 before | Expand all | Expand 10 after
177 void PrintViewManager::set_observer(PrintViewManagerObserver* observer) { 177 void PrintViewManager::set_observer(PrintViewManagerObserver* observer) {
178 DCHECK(!observer || !observer_); 178 DCHECK(!observer || !observer_);
179 observer_ = observer; 179 observer_ = observer;
180 } 180 }
181 181
182 void PrintViewManager::StopNavigation() { 182 void PrintViewManager::StopNavigation() {
183 // Cancel the current job, wait for the worker to finish. 183 // Cancel the current job, wait for the worker to finish.
184 TerminatePrintJob(true); 184 TerminatePrintJob(true);
185 } 185 }
186 186
187 void PrintViewManager::RenderViewGone(base::TerminationStatus status) { 187 void PrintViewManager::RenderProcessGone(base::TerminationStatus status) {
188 print_preview_state_ = NOT_PREVIEWING; 188 print_preview_state_ = NOT_PREVIEWING;
189 ReleasePrinterQuery(); 189 ReleasePrinterQuery();
190 190
191 if (!print_job_.get()) 191 if (!print_job_.get())
192 return; 192 return;
193 193
194 scoped_refptr<PrintedDocument> document(print_job_->document()); 194 scoped_refptr<PrintedDocument> document(print_job_->document());
195 if (document.get()) { 195 if (document.get()) {
196 // If IsComplete() returns false, the document isn't completely rendered. 196 // If IsComplete() returns false, the document isn't completely rendered.
197 // Since our renderer is gone, there's nothing to do, cancel it. Otherwise, 197 // Since our renderer is gone, there's nothing to do, cancel it. Otherwise,
(...skipping 478 matching lines...) Expand 10 before | Expand all | Expand 10 after
676 scoped_refptr<printing::PrinterQuery> printer_query; 676 scoped_refptr<printing::PrinterQuery> printer_query;
677 print_job_manager->PopPrinterQuery(cookie, &printer_query); 677 print_job_manager->PopPrinterQuery(cookie, &printer_query);
678 if (!printer_query.get()) 678 if (!printer_query.get())
679 return; 679 return;
680 BrowserThread::PostTask( 680 BrowserThread::PostTask(
681 BrowserThread::IO, FROM_HERE, 681 BrowserThread::IO, FROM_HERE,
682 base::Bind(&PrinterQuery::StopWorker, printer_query.get())); 682 base::Bind(&PrinterQuery::StopWorker, printer_query.get()));
683 } 683 }
684 684
685 } // namespace printing 685 } // namespace printing
OLDNEW
« no previous file with comments | « chrome/browser/printing/print_view_manager.h ('k') | chrome/browser/renderer_host/render_process_host_chrome_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698