Index: chrome/renderer/printing/print_web_view_helper.h |
diff --git a/chrome/renderer/printing/print_web_view_helper.h b/chrome/renderer/printing/print_web_view_helper.h |
index f75885c763cdadc0da7fcc1b4a70fd94846b4f1f..517470a909330d8631a9a65bac0c8b5e9c392ebd 100644 |
--- a/chrome/renderer/printing/print_web_view_helper.h |
+++ b/chrome/renderer/printing/print_web_view_helper.h |
@@ -138,6 +138,12 @@ class PrintWebViewHelper |
// Start the process of generating a print preview using |settings|. |
void OnPrintPreview(const base::DictionaryValue& settings); |
+ // Prepare frame for creating preview document. |
+ void PrepareFrameForPreviewDocument(); |
+ |
+ // Continue creating preview document. |
+ void OnFramePreparedForPreviewDocument(); |
+ |
// Initialize the print preview document. |
bool CreatePreviewDocument(); |
@@ -352,9 +358,8 @@ class PrintWebViewHelper |
void OnPrintPreview(); |
// Create the print preview document. |pages| is empty to print all pages. |
- bool CreatePreviewDocument(const PrintMsg_Print_Params& params, |
- const std::vector<int>& pages, |
- bool ignore_css_margins); |
+ bool CreatePreviewDocument(PrepareFrameAndViewForPrint* prepared_frame, |
Lei Zhang
2013/01/26 08:40:36
Mention this takes ownership of |prepared_frame|.
Vitaly Buka (NO REVIEWS)
2013/01/26 10:29:30
Done.
|
+ const std::vector<int>& pages); |
// Called after a page gets rendered. |page_time| is how long the |
// rendering took. |
@@ -376,6 +381,7 @@ class PrintWebViewHelper |
int GetNextPageNumber(); |
bool IsRendering() const; |
bool IsModifiable() const; |
+ bool HasSelection() const; |
bool IsLastPageOfPrintReadyMetafile() const; |
bool IsFinalPageRendered() const; |
@@ -384,8 +390,10 @@ class PrintWebViewHelper |
void set_error(enum PrintPreviewErrorBuckets error); |
// Getters |
- WebKit::WebFrame* frame(); |
- const WebKit::WebNode& node() const; |
+ WebKit::WebFrame* prepared_frame(); |
Lei Zhang
2013/01/26 08:40:36
Please mention the difference between the source a
Vitaly Buka (NO REVIEWS)
2013/01/26 10:29:30
Done.
|
+ const WebKit::WebNode& prepared_node() const; |
+ WebKit::WebFrame* source_frame(); |
+ const WebKit::WebNode& source_node() const; |
int total_page_count() const; |
bool generate_draft_pages() const; |
PreviewMetafile* metafile(); |
@@ -404,15 +412,12 @@ class PrintWebViewHelper |
void ClearContext(); |
// Specifies what to render for print preview. |
- WebKit::WebFrame* frame_; |
- WebKit::WebNode node_; |
+ WebKit::WebFrame* source_frame_; |
+ WebKit::WebNode source_node_; |
scoped_ptr<PrepareFrameAndViewForPrint> prep_frame_view_; |
scoped_ptr<PreviewMetafile> metafile_; |
- // Total page count in the renderer. |
- int total_page_count_; |
- |
// The current page to render. |
int current_page_index_; |