Index: chrome/browser/printing/print_view_manager.h |
diff --git a/chrome/browser/printing/print_view_manager.h b/chrome/browser/printing/print_view_manager.h |
index 308400dba0323195c7feab8b33675c8640ceaa6a..7dbabf0a853d2002f27caf9844ab3bf4a7482123 100644 |
--- a/chrome/browser/printing/print_view_manager.h |
+++ b/chrome/browser/printing/print_view_manager.h |
@@ -22,6 +22,7 @@ namespace printing { |
class JobEventDetails; |
class PrintJob; |
class PrintJobWorkerOwner; |
+class PrintViewManagerDelegate; |
// Manages the print commands in relation to a TabContents. TabContents |
// delegates a few printing related commands to this instance. |
@@ -38,8 +39,10 @@ class PrintViewManager : public NotificationObserver, |
// Prints the current document immediately. Since the rendering is |
// asynchronous, the actual printing will not be completed on the return of |
- // this function. Returns false if printing is impossible at the moment. |
- bool PrintNow(); |
+ // this function. |delegate| is optional and may be used to be notified when |
+ // the print dialog is shown. Returns false if printing is impossible at the |
+ // moment. |
+ bool PrintNow(PrintViewManagerDelegate* delegate); |
Lei Zhang
2011/06/21 01:54:46
Since we expect |delegate| to be NULL most of the
James Hawkins
2011/06/22 23:47:24
I'd rather not, as that complicates the API unnece
|
// Initiate print preview of the current document by first notifying the |
// renderer. Since this happens asynchronous, the print preview tab creation |
@@ -71,6 +74,7 @@ class PrintViewManager : public NotificationObserver, |
private: |
// IPC Message handlers. |
void OnDidGetPrintedPagesCount(int cookie, int number_pages); |
+ void OnDidShowPrintDialog(); |
void OnDidPrintPage(const PrintHostMsg_DidPrintPage_Params& params); |
void OnPrintingFailed(int cookie); |
@@ -150,6 +154,9 @@ class PrintViewManager : public NotificationObserver, |
bool is_title_overridden_; |
string16 overridden_title_; |
+ // Weak pointer to a delegate that is notified when the print dialog is shown. |
+ PrintViewManagerDelegate* delegate_; |
+ |
DISALLOW_COPY_AND_ASSIGN(PrintViewManager); |
}; |