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

Unified Diff: content/browser/renderer_host/render_widget_host_impl.h

Issue 2242613003: Hoist SetNeedsBeginFrame messages up to the RWHostImpl (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Remove base class call Created 4 years, 4 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: content/browser/renderer_host/render_widget_host_impl.h
diff --git a/content/browser/renderer_host/render_widget_host_impl.h b/content/browser/renderer_host/render_widget_host_impl.h
index 473d0ee647b44d2d2e08b2cbccb54cc99db97a0b..8f319bd132f632437bb85799d5cc672b1316dc3d 100644
--- a/content/browser/renderer_host/render_widget_host_impl.h
+++ b/content/browser/renderer_host/render_widget_host_impl.h
@@ -524,6 +524,8 @@ class CONTENT_EXPORT RenderWidgetHostImpl : public RenderWidgetHost,
bool renderer_initialized() const { return renderer_initialized_; }
+ bool needs_begin_frames() const { return needs_begin_frames_; }
+
protected:
// ---------------------------------------------------------------------------
// The following method is overridden by RenderViewHost to send upwards to
@@ -593,6 +595,7 @@ class CONTENT_EXPORT RenderWidgetHostImpl : public RenderWidgetHost,
void OnSelectionBoundsChanged(
const ViewHostMsg_SelectionBounds_Params& params);
void OnForwardCompositorProto(const std::vector<uint8_t>& proto);
+ void OnSetNeedsBeginFrames(bool needs_begin_frames);
void OnHittestData(const FrameHostMsg_HittestData_Params& params);
// Called (either immediately or asynchronously) after we're done with our
@@ -817,6 +820,11 @@ class CONTENT_EXPORT RenderWidgetHostImpl : public RenderWidgetHost,
// causing HasFocus to return false when is_focused_ is true.
bool is_focused_;
+ // Whether the view should send begin frame messages to its render widget.
+ // This is state that may arrive before the view has been set and that must be
+ // consistent with the state in the renderer, so this host handles it.
+ bool needs_begin_frames_ = false;
+
// This value indicates how long to wait before we consider a renderer hung.
base::TimeDelta hung_renderer_delay_;

Powered by Google App Engine
This is Rietveld 408576698