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

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

Issue 194383002: Show dialog as separate post task. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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_base.h" 5 #include "chrome/browser/printing/print_view_manager_base.h"
6 6
7 #include <map> 7 #include <map>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/memory/scoped_ptr.h" 10 #include "base/memory/scoped_ptr.h"
(...skipping 179 matching lines...) Expand 10 before | Expand all | Expand 10 after
190 ShouldQuitFromInnerMessageLoop(); 190 ShouldQuitFromInnerMessageLoop();
191 } 191 }
192 192
193 void PrintViewManagerBase::OnPrintingFailed(int cookie) { 193 void PrintViewManagerBase::OnPrintingFailed(int cookie) {
194 if (cookie != cookie_) { 194 if (cookie != cookie_) {
195 NOTREACHED(); 195 NOTREACHED();
196 return; 196 return;
197 } 197 }
198 198
199 #if defined(ENABLE_FULL_PRINTING) 199 #if defined(ENABLE_FULL_PRINTING)
200 chrome::ShowPrintErrorDialog( 200 chrome::ShowPrintErrorDialog();
201 web_contents()->GetView()->GetTopLevelNativeWindow());
202 #endif 201 #endif
203 202
204 ReleasePrinterQuery(); 203 ReleasePrinterQuery();
205 204
206 content::NotificationService::current()->Notify( 205 content::NotificationService::current()->Notify(
207 chrome::NOTIFICATION_PRINT_JOB_RELEASED, 206 chrome::NOTIFICATION_PRINT_JOB_RELEASED,
208 content::Source<content::WebContents>(web_contents()), 207 content::Source<content::WebContents>(web_contents()),
209 content::NotificationService::NoDetails()); 208 content::NotificationService::NoDetails());
210 } 209 }
211 210
(...skipping 310 matching lines...) Expand 10 before | Expand all | Expand 10 after
522 scoped_refptr<printing::PrinterQuery> printer_query; 521 scoped_refptr<printing::PrinterQuery> printer_query;
523 printer_query = queue_->PopPrinterQuery(cookie); 522 printer_query = queue_->PopPrinterQuery(cookie);
524 if (!printer_query) 523 if (!printer_query)
525 return; 524 return;
526 BrowserThread::PostTask( 525 BrowserThread::PostTask(
527 BrowserThread::IO, FROM_HERE, 526 BrowserThread::IO, FROM_HERE,
528 base::Bind(&PrinterQuery::StopWorker, printer_query.get())); 527 base::Bind(&PrinterQuery::StopWorker, printer_query.get()));
529 } 528 }
530 529
531 } // namespace printing 530 } // namespace printing
OLDNEW
« no previous file with comments | « chrome/browser/printing/print_error_dialog.cc ('k') | chrome/browser/ui/webui/print_preview/print_preview_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698