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

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

Issue 125082: Add Print Selection support to Chrome. This change is fairly involved since ... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 6 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 (c) 2006-2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2008 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 #ifndef CHROME_BROWSER_PRINTING_PRINT_VIEW_MANAGER_H_ 5 #ifndef CHROME_BROWSER_PRINTING_PRINT_VIEW_MANAGER_H_
6 #define CHROME_BROWSER_PRINTING_PRINT_VIEW_MANAGER_H_ 6 #define CHROME_BROWSER_PRINTING_PRINT_VIEW_MANAGER_H_
7 7
8 #include "base/ref_counted.h" 8 #include "base/ref_counted.h"
9 #include "chrome/browser/printing/printed_pages_source.h" 9 #include "chrome/browser/printing/printed_pages_source.h"
10 #include "chrome/common/notification_registrar.h" 10 #include "chrome/common/notification_registrar.h"
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
70 // Creates a new empty print job. It has no settings loaded. If there is 70 // Creates a new empty print job. It has no settings loaded. If there is
71 // currently a print job, safely disconnect from it. Returns false if it is 71 // currently a print job, safely disconnect from it. Returns false if it is
72 // impossible to safely disconnect from the current print job or it is 72 // impossible to safely disconnect from the current print job or it is
73 // impossible to create a new print job. 73 // impossible to create a new print job.
74 bool CreateNewPrintJob(PrintJobWorkerOwner* job); 74 bool CreateNewPrintJob(PrintJobWorkerOwner* job);
75 75
76 // Makes sure the current print_job_ has all its data before continuing, and 76 // Makes sure the current print_job_ has all its data before continuing, and
77 // disconnect from it. 77 // disconnect from it.
78 void DisconnectFromCurrentPrintJob(); 78 void DisconnectFromCurrentPrintJob();
79 79
80 // Notify that the printing is done.
81 void PrintingDone(bool success);
82
80 // Terminates the print job. Noop if no print job has been created. If 83 // Terminates the print job. Noop if no print job has been created. If
81 // |cancel| is true, cancel it instead of waiting for the job to finish. Will 84 // |cancel| is true, cancel it instead of waiting for the job to finish. Will
82 // call ReleasePrintJob(). 85 // call ReleasePrintJob().
83 void TerminatePrintJob(bool cancel); 86 void TerminatePrintJob(bool cancel);
84 87
85 // Releases print_job_. Correctly deregisters from notifications. Noop if 88 // Releases print_job_. Correctly deregisters from notifications. Noop if
86 // no print job has been created. 89 // no print job has been created.
87 void ReleasePrintJob(); 90 void ReleasePrintJob();
88 91
89 // Prints the document. Starts the actual print job. Requests asynchronously 92 // Prints the document. Starts the actual print job. Requests asynchronously
(...skipping 16 matching lines...) Expand all
106 NotificationRegistrar registrar_; 109 NotificationRegistrar registrar_;
107 110
108 // Manages the low-level talk to the printer. 111 // Manages the low-level talk to the printer.
109 scoped_refptr<PrintJob> print_job_; 112 scoped_refptr<PrintJob> print_job_;
110 113
111 // Waiting for print_job_ initialization to be completed to start printing. 114 // Waiting for print_job_ initialization to be completed to start printing.
112 // Specifically the DEFAULT_INIT_DONE notification. Set when PrintNow() is 115 // Specifically the DEFAULT_INIT_DONE notification. Set when PrintNow() is
113 // called. 116 // called.
114 bool waiting_to_print_; 117 bool waiting_to_print_;
115 118
119 // Indication of success of the print job.
120 bool printing_succeeded_;
121
116 // Running an inner message loop inside RenderAllMissingPagesNow(). This means 122 // Running an inner message loop inside RenderAllMissingPagesNow(). This means
117 // we are _blocking_ until all the necessary pages have been rendered or the 123 // we are _blocking_ until all the necessary pages have been rendered or the
118 // print settings are being loaded. 124 // print settings are being loaded.
119 bool inside_inner_message_loop_; 125 bool inside_inner_message_loop_;
120 126
121 // PrintViewManager is created as an extension of WebContent specialized for 127 // PrintViewManager is created as an extension of WebContent specialized for
122 // printing-related behavior. Still, access to the renderer is needed so a 128 // printing-related behavior. Still, access to the renderer is needed so a
123 // back reference is kept the the "parent object". 129 // back reference is kept the the "parent object".
124 TabContents& owner_; 130 TabContents& owner_;
125 131
126 DISALLOW_COPY_AND_ASSIGN(PrintViewManager); 132 DISALLOW_COPY_AND_ASSIGN(PrintViewManager);
127 }; 133 };
128 134
129 } // namespace printing 135 } // namespace printing
130 136
131 #endif // CHROME_BROWSER_PRINTING_PRINT_VIEW_MANAGER_H_ 137 #endif // CHROME_BROWSER_PRINTING_PRINT_VIEW_MANAGER_H_
OLDNEW
« no previous file with comments | « chrome/browser/printing/print_job_worker.cc ('k') | chrome/browser/printing/print_view_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698