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

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

Issue 8477042: Move Sad Tab implementation out of the TabContentsViews. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: changes for jochen and jam Created 9 years, 1 month 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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 "base/bind.h" 7 #include "base/bind.h"
8 #include "base/memory/scoped_ptr.h" 8 #include "base/memory/scoped_ptr.h"
9 #include "base/utf_string_conversions.h" 9 #include "base/utf_string_conversions.h"
10 #include "chrome/browser/browser_process.h" 10 #include "chrome/browser/browser_process.h"
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after
128 128
129 void PrintViewManager::ResetTitleOverride() { 129 void PrintViewManager::ResetTitleOverride() {
130 is_title_overridden_ = false; 130 is_title_overridden_ = false;
131 } 131 }
132 132
133 void PrintViewManager::StopNavigation() { 133 void PrintViewManager::StopNavigation() {
134 // Cancel the current job, wait for the worker to finish. 134 // Cancel the current job, wait for the worker to finish.
135 TerminatePrintJob(true); 135 TerminatePrintJob(true);
136 } 136 }
137 137
138 void PrintViewManager::RenderViewGone() { 138 void PrintViewManager::RenderViewGone(base::TerminationStatus status) {
139 if (!print_job_.get()) 139 if (!print_job_.get())
140 return; 140 return;
141 141
142 scoped_refptr<PrintedDocument> document(print_job_->document()); 142 scoped_refptr<PrintedDocument> document(print_job_->document());
143 if (document) { 143 if (document) {
144 // If IsComplete() returns false, the document isn't completely rendered. 144 // If IsComplete() returns false, the document isn't completely rendered.
145 // Since our renderer is gone, there's nothing to do, cancel it. Otherwise, 145 // Since our renderer is gone, there's nothing to do, cancel it. Otherwise,
146 // the print job may finish without problem. 146 // the print job may finish without problem.
147 TerminatePrintJob(!document->IsComplete()); 147 TerminatePrintJob(!document->IsComplete());
148 } 148 }
(...skipping 378 matching lines...) Expand 10 before | Expand all | Expand 10 after
527 } 527 }
528 528
529 bool PrintViewManager::PrintNowInternal(IPC::Message* message) { 529 bool PrintViewManager::PrintNowInternal(IPC::Message* message) {
530 // Don't print / print preview interstitials. 530 // Don't print / print preview interstitials.
531 if (tab_contents()->showing_interstitial_page()) 531 if (tab_contents()->showing_interstitial_page())
532 return false; 532 return false;
533 return Send(message); 533 return Send(message);
534 } 534 }
535 535
536 } // namespace printing 536 } // namespace printing
OLDNEW
« no previous file with comments | « chrome/browser/printing/print_view_manager.h ('k') | chrome/browser/tab_contents/background_contents.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698