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

Unified Diff: chrome/browser/printing/print_job_worker.h

Issue 504763002: Revert of Added PrintingContext::Delegate to get parent view handle and application locale. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 4 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/print_job_unittest.cc ('k') | chrome/browser/printing/print_job_worker.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/printing/print_job_worker.h
diff --git a/chrome/browser/printing/print_job_worker.h b/chrome/browser/printing/print_job_worker.h
index 6c86774dc0a2d9c5bfeb978884a0739be4dcd3d6..2f6d2371c99181bf7531be021235c7bd2cbf60b1 100644
--- a/chrome/browser/printing/print_job_worker.h
+++ b/chrome/browser/printing/print_job_worker.h
@@ -9,11 +9,10 @@
#include "base/memory/scoped_ptr.h"
#include "base/memory/weak_ptr.h"
#include "base/threading/thread.h"
-#include "content/public/browser/browser_thread.h"
#include "printing/page_number.h"
#include "printing/print_destination_interface.h"
+#include "printing/printing_context.h"
#include "printing/print_job_constants.h"
-#include "printing/printing_context.h"
namespace base {
class DictionaryValue;
@@ -25,6 +24,7 @@
class PrintJobWorkerOwner;
class PrintedDocument;
class PrintedPage;
+class PrintingUIWebContentsObserver;
// Worker thread code. It manages the PrintingContext, which can be blocking
// and/or run a message loop. This is the object that generates most
@@ -33,9 +33,7 @@
// PrintJob always outlives its worker instance.
class PrintJobWorker {
public:
- PrintJobWorker(int render_process_id,
- int render_view_id,
- PrintJobWorkerOwner* owner);
+ explicit PrintJobWorker(PrintJobWorkerOwner* owner);
virtual ~PrintJobWorker();
void SetNewOwner(PrintJobWorkerOwner* new_owner);
@@ -48,12 +46,14 @@
// Print... dialog box will be shown to ask the user his preference.
void GetSettings(
bool ask_user_for_settings,
+ scoped_ptr<PrintingUIWebContentsObserver> web_contents_observer,
int document_page_count,
bool has_selection,
MarginType margin_type);
// Set the new print settings.
- void SetSettings(scoped_ptr<base::DictionaryValue> new_settings);
+ void SetSettings(
+ scoped_ptr<base::DictionaryValue> new_settings);
// Starts the printing loop. Every pages are printed as soon as the data is
// available. Makes sure the new_document is the right one.
@@ -112,6 +112,7 @@
// Required on Mac and Linux. Windows can display UI from non-main threads,
// but sticks with this for consistency.
void GetSettingsWithUI(
+ scoped_ptr<PrintingUIWebContentsObserver> web_contents_observer,
int document_page_count,
bool has_selection);
@@ -130,11 +131,6 @@
// displaying a dialog. So this needs to happen from the UI thread on these
// systems.
void UseDefaultSettings();
-
- // Printing context delegate.
- scoped_ptr<PrintingContext::Delegate,
- content::BrowserThread::DeleteOnUIThread>
- printing_context_delegate_;
// Information about the printer setting.
scoped_ptr<PrintingContext> printing_context_;
« no previous file with comments | « chrome/browser/printing/print_job_unittest.cc ('k') | chrome/browser/printing/print_job_worker.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698