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

Unified Diff: components/printing/renderer/print_web_view_helper.h

Issue 2849483002: Defer deletion in PrintWebViewHelper while handling IPC messages. (Closed)
Patch Set: Created 3 years, 8 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
« no previous file with comments | « no previous file | components/printing/renderer/print_web_view_helper.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/printing/renderer/print_web_view_helper.h
diff --git a/components/printing/renderer/print_web_view_helper.h b/components/printing/renderer/print_web_view_helper.h
index 652fbf03d63d0459138f1723bf2c72fc6113b790..15d2c288e78a4722d272ce1b784339b82fdad075 100644
--- a/components/printing/renderer/print_web_view_helper.h
+++ b/components/printing/renderer/print_web_view_helper.h
@@ -449,7 +449,7 @@ class PrintWebViewHelper
// Helper functions
int GetNextPageNumber();
bool IsRendering() const;
- bool IsModifiable();
+ bool IsModifiable() const;
bool HasSelection();
bool IsLastPageOfPrintReadyMetafile() const;
bool IsFinalPageRendered() const;
@@ -487,6 +487,8 @@ class PrintWebViewHelper
// Reset some of the internal rendering context.
void ClearContext();
+ void CalculateIsModifiable();
+
// Specifies what to render for print preview.
FrameReference source_frame_;
blink::WebNode source_node_;
@@ -506,6 +508,9 @@ class PrintWebViewHelper
// True, when draft pages needs to be generated.
bool generate_draft_pages_;
+ // True, if the document source is modifiable. e.g. HTML and not PDF.
+ bool is_modifiable_;
lfg 2017/04/27 19:44:14 This seems to be uninitialized in the constructor.
Lei Zhang 2017/04/27 20:31:24 Right. It's not ever used until after one of the I
+
// Specifies the total number of pages in the print ready metafile.
int print_ready_metafile_page_count_;
@@ -515,6 +520,8 @@ class PrintWebViewHelper
enum PrintPreviewErrorBuckets error_;
State state_;
+
+ DISALLOW_COPY_AND_ASSIGN(PrintPreviewContext);
};
class ScriptingThrottler {
@@ -541,6 +548,7 @@ class PrintWebViewHelper
bool is_loading_;
bool is_scripted_preview_delayed_;
int ipc_nesting_level_;
+ bool render_frame_gone_;
// Used to fix a race condition where the source is a PDF and print preview
// hangs because RequestPrintPreview is called before DidStopLoading() is
« no previous file with comments | « no previous file | components/printing/renderer/print_web_view_helper.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698