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

Unified Diff: content/renderer/render_view_impl.h

Issue 1449353002: OOPIF: Set timer for per-frame UpdateState. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Make private Created 5 years, 1 month 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/renderer/render_view_impl.h
diff --git a/content/renderer/render_view_impl.h b/content/renderer/render_view_impl.h
index c2527cdc353e42496a8d4378990ee9a934b52c2b..72fd49d2bc6e5ba4cf2f3e4a466f46b93b90243f 100644
--- a/content/renderer/render_view_impl.h
+++ b/content/renderer/render_view_impl.h
@@ -291,6 +291,11 @@ class CONTENT_EXPORT RenderViewImpl
void TransferActiveWheelFlingAnimation(
const blink::WebActiveWheelFlingParameters& params);
+ // Starts a timer to send an UpdateState message on behalf of |frame|, if the
+ // timer isn't already running. This allows multiple state changing events to
+ // be coalesced into one update.
+ void StartNavStateSyncTimerIfNecessary(RenderFrameImpl* frame);
+
// Synchronously sends the current navigation state to the browser.
void SendUpdateState();
@@ -574,8 +579,6 @@ class CONTENT_EXPORT RenderViewImpl
// are to be moved to RenderFrameImpl <http://crbug.com/361761>.
void didChangeIcon(blink::WebLocalFrame*, blink::WebIconURL::Type);
- void didUpdateCurrentHistoryItem(blink::WebLocalFrame* frame);
- void didChangeScrollOffset(blink::WebLocalFrame* frame);
static Referrer GetReferrerFromRequest(
blink::WebFrame* frame,
@@ -714,15 +717,16 @@ class CONTENT_EXPORT RenderViewImpl
const blink::WebRect& selection_rect,
bool final_status_update);
- // Starts nav_state_sync_timer_ if it isn't already running.
- void StartNavStateSyncTimerIfNecessary();
-
#if defined(OS_WIN) || (defined(OS_POSIX) && !defined(OS_MACOSX))
void UpdateFontRenderingFromRendererPrefs();
#else
void UpdateFontRenderingFromRendererPrefs() {}
#endif
+ // In OOPIF-enabled modes, this tells each RenderFrame with a pending state
+ // update to inform the browser process.
+ void SendFrameStateUpdates();
+
// Update the target url and tell the browser that the target URL has changed.
// If |url| is empty, show |fallback_url|.
void UpdateTargetURL(const GURL& url, const GURL& fallback_url);
@@ -825,6 +829,10 @@ class CONTENT_EXPORT RenderViewImpl
// StartNavStateSyncTimerIfNecessary).
base::OneShotTimer nav_state_sync_timer_;
+ // Set of RenderFrame routing IDs for frames that having pending UpdateState
+ // messages to send when the next |nav_state_sync_timer_| fires.
+ std::set<int> frames_with_pending_state_;
+
// Page IDs ------------------------------------------------------------------
// See documentation in RenderView.
int32 page_id_;

Powered by Google App Engine
This is Rietveld 408576698