Update printing code
This commit is contained in:
parent
6d32db32ef
commit
d309fd5a27
23 changed files with 665 additions and 485 deletions
|
@ -15,15 +15,19 @@
|
|||
|
||||
class Thread;
|
||||
|
||||
namespace base {
|
||||
class RefCountedMemory;
|
||||
}
|
||||
|
||||
namespace printing {
|
||||
|
||||
// See definition below.
|
||||
class JobEventDetails;
|
||||
|
||||
class MetafilePlayer;
|
||||
class PdfToEmfConverter;
|
||||
class PrintJobWorker;
|
||||
class PrintedDocument;
|
||||
class PrintedPage;
|
||||
class PrintedPagesSource;
|
||||
class PrintJobWorker;
|
||||
class PrinterQuery;
|
||||
|
||||
// Manages the print work for a specific document. Talks to the printer through
|
||||
|
@ -33,8 +37,7 @@ class PrinterQuery;
|
|||
// reference to the job to be sure it is kept alive. All the code in this class
|
||||
// runs in the UI thread.
|
||||
class PrintJob : public PrintJobWorkerOwner,
|
||||
public content::NotificationObserver,
|
||||
public base::MessageLoop::DestructionObserver {
|
||||
public content::NotificationObserver {
|
||||
public:
|
||||
// Create a empty PrintJob. When initializing with this constructor,
|
||||
// post-constructor initialization must be done with Initialize().
|
||||
|
@ -54,13 +57,9 @@ class PrintJob : public PrintJobWorkerOwner,
|
|||
virtual void GetSettingsDone(const PrintSettings& new_settings,
|
||||
PrintingContext::Result result) OVERRIDE;
|
||||
virtual PrintJobWorker* DetachWorker(PrintJobWorkerOwner* new_owner) OVERRIDE;
|
||||
virtual base::MessageLoop* message_loop() OVERRIDE;
|
||||
virtual const PrintSettings& settings() const OVERRIDE;
|
||||
virtual int cookie() const OVERRIDE;
|
||||
|
||||
// DestructionObserver implementation.
|
||||
virtual void WillDestroyCurrentMessageLoop() OVERRIDE;
|
||||
|
||||
// Starts the actual printing. Signals the worker that it should begin to
|
||||
// spool as soon as data is available.
|
||||
void StartPrinting();
|
||||
|
@ -116,10 +115,6 @@ class PrintJob : public PrintJobWorkerOwner,
|
|||
|
||||
content::NotificationRegistrar registrar_;
|
||||
|
||||
// Main message loop reference. Used to send notifications in the right
|
||||
// thread.
|
||||
base::MessageLoop* const ui_message_loop_;
|
||||
|
||||
// Source that generates the PrintedPage's (i.e. a WebContents). It will be
|
||||
// set back to NULL if the source is deleted before this object.
|
||||
PrintedPagesSource* source_;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue