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

Unified Diff: content/renderer/render_widget.h

Issue 2707243005: Discard compositor frames from unloaded web content (Closed)
Patch Set: Add default value for source ID in frame metadata Created 3 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
« no previous file with comments | « content/renderer/render_frame_impl.cc ('k') | content/renderer/render_widget.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/render_widget.h
diff --git a/content/renderer/render_widget.h b/content/renderer/render_widget.h
index e808bcc2e254bca5dbfc8b95f3bd051bcf25b37f..e43cd4db32d26c5e6869ce010d090fbb315c0f4b 100644
--- a/content/renderer/render_widget.h
+++ b/content/renderer/render_widget.h
@@ -414,6 +414,9 @@ class CONTENT_EXPORT RenderWidget
virtual void TransferActiveWheelFlingAnimation(
const blink::WebActiveWheelFlingParameters& params) {}
+ uint32_t GetContentSourceId();
+ void IncrementContentSourceId();
+
protected:
// Friend RefCounted so that the dtor can be non-public. Using this class
// without ref-counting is an error.
@@ -847,6 +850,19 @@ class CONTENT_EXPORT RenderWidget
bool time_to_first_active_paint_recorded_;
base::TimeTicks was_shown_time_;
+ // This is initialized to zero and is incremented on each non-same-page
+ // navigation commit by RenderFrameImpl. At that time it is sent to the
+ // compositor so that it can tag compositor frames, and RenderFrameImpl is
+ // responsible for sending it to the browser process to be used to match
+ // each compositor frame to the most recent page navigation before it was
+ // generated.
+ // This only applies to main frames, and is not touched for subframe
+ // RenderWidgets, where there is no concern around displaying unloaded
+ // content.
+ // TODO(kenrb, fsamuel): This should be removed when SurfaceIDs can be used
+ // to replace it. See https://crbug.com/695579.
+ uint32_t current_content_source_id_;
+
base::WeakPtrFactory<RenderWidget> weak_ptr_factory_;
DISALLOW_COPY_AND_ASSIGN(RenderWidget);
« no previous file with comments | « content/renderer/render_frame_impl.cc ('k') | content/renderer/render_widget.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698