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

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

Issue 6775013: PrintPreview: While printing the preview data, set the initiator tab title as print job name. (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: Updated the CL. Created 9 years, 9 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
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 afd551985794ecb8bf2efd9dadaa3ecaa77ed21e..df428fd9635ba7c6da693a0b40cdc35c4b080a4d 100644
--- a/chrome/browser/printing/print_view_manager.h
+++ b/chrome/browser/printing/print_view_manager.h
@@ -51,7 +51,9 @@ class PrintViewManager : public NotificationObserver,
virtual void StopNavigation();
private:
- void OnDidGetPrintedPagesCount(int cookie, int number_pages);
+ void OnDidGetBasicPrintJobInfo(int cookie,
+ int number_pages,
+ const string16& job_title);
void OnDidPrintPage(const PrintHostMsg_DidPrintPage_Params& params);
// Processes a NOTIFY_PRINT_JOB_EVENT notification.
@@ -128,6 +130,14 @@ class PrintViewManager : public NotificationObserver,
bool expecting_first_page_;
#endif
+ // Current print job title.
+ // For preview printing, |job_title_| is set to initiator tab title in
+ // PrintHostMsg_DidGetBasicPrintJobInfo message handler.
stuartmorgan 2011/03/30 22:59:17 Having this much detail about the implementation i
+ // For normal printing, |job_title_| is empty. Print view manager will use
+ // the current tab title as print job title. If the current tab title is
+ // empty, use the default job title.
stuartmorgan 2011/03/30 22:59:17 I wouldn't even mention print preview vs "normal"
+ string16 job_title_;
+
DISALLOW_COPY_AND_ASSIGN(PrintViewManager);
};
« no previous file with comments | « no previous file | chrome/browser/printing/print_view_manager.cc » ('j') | chrome/browser/printing/print_view_manager.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698