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

Unified Diff: chrome/browser/printing/print_view_manager.cc

Issue 6930034: Print Preview: Print in the background. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years, 7 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/printing/background_printing_manager.cc ('k') | chrome/browser/ui/browser_list.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/printing/print_view_manager.cc
===================================================================
--- chrome/browser/printing/print_view_manager.cc (revision 84344)
+++ chrome/browser/printing/print_view_manager.cc (working copy)
@@ -17,6 +17,7 @@
#include "content/browser/tab_contents/navigation_entry.h"
#include "content/browser/tab_contents/tab_contents.h"
#include "content/common/notification_details.h"
+#include "content/common/notification_service.h"
#include "content/common/notification_source.h"
#include "grit/generated_resources.h"
#include "printing/metafile.h"
@@ -175,6 +176,11 @@
NewRunnableMethod(printer_query.get(),
&printing::PrinterQuery::StopWorker));
}
+
+ NotificationService::current()->Notify(
+ NotificationType::PRINT_JOB_RELEASED,
+ Source<TabContents>(tab_contents()),
+ NotificationService::NoDetails());
}
bool PrintViewManager::OnMessageReceived(const IPC::Message& message) {
@@ -209,6 +215,11 @@
switch (event_details.type()) {
case JobEventDetails::FAILED: {
TerminatePrintJob(true);
+
+ NotificationService::current()->Notify(
+ NotificationType::PRINT_JOB_RELEASED,
+ Source<TabContents>(tab_contents()),
+ NotificationService::NoDetails());
break;
}
case JobEventDetails::USER_INIT_DONE:
@@ -234,6 +245,11 @@
// of object registration.
printing_succeeded_ = true;
ReleasePrintJob();
+
+ NotificationService::current()->Notify(
+ NotificationType::PRINT_JOB_RELEASED,
+ Source<TabContents>(tab_contents()),
+ NotificationService::NoDetails());
break;
}
default: {
« no previous file with comments | « chrome/browser/printing/background_printing_manager.cc ('k') | chrome/browser/ui/browser_list.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698