Index: content/browser/renderer_host/render_view_host_impl.h |
diff --git a/content/browser/renderer_host/render_view_host_impl.h b/content/browser/renderer_host/render_view_host_impl.h |
index 08c12eb2f10c40beea33798b41a8fcdb57252210..e45f07db20fd44994b0f03c6c295c9630bde568a 100644 |
--- a/content/browser/renderer_host/render_view_host_impl.h |
+++ b/content/browser/renderer_host/render_view_host_impl.h |
@@ -221,6 +221,16 @@ class CONTENT_EXPORT RenderViewHostImpl |
bool is_active() const { return is_active_; } |
void set_is_active(bool is_active) { is_active_ = is_active; } |
+ // Tracks whether this RenderViewHost is pending deletion. This is tracked |
+ // separately from the main frame pending deletion state, because the |
+ // RenderViewHost's main frame is cleared when the main frame's |
+ // RenderFrameHost is marked for deletion. |
+ // |
+ // TODO(nasko,alexmos): This should not be necessary once swapped-out is |
+ // removed. |
+ bool is_pending_deletion() const { return is_pending_deletion_; } |
+ void set_pending_deletion() { is_pending_deletion_ = true; } |
+ |
// Tracks whether this RenderViewHost is swapped out, according to its main |
// frame RenderFrameHost. |
void set_is_swapped_out(bool is_swapped_out) { |
@@ -443,6 +453,9 @@ class CONTENT_EXPORT RenderViewHostImpl |
// it is not visible to the user in any of these cases. |
bool is_active_; |
+ // True if this RenderViewHost is pending deletion. |
+ bool is_pending_deletion_; |
+ |
// Tracks whether the main frame RenderFrameHost is swapped out. Unlike |
// is_active_, this is false when the frame is pending swap out or deletion. |
// TODO(creis): Remove this when we no longer use swappedout://. |