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

Unified Diff: content/renderer/render_view.cc

Issue 7065029: Add mayHaveChangedRenderedSize callback. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: v4 Created 9 years, 7 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_view.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/render_view.cc
diff --git a/content/renderer/render_view.cc b/content/renderer/render_view.cc
index f7788e28394c546c85b4d89ba3f1c632265e105a..d7b52dce312dec6d9e281f921d8f501ec096ec44 100644
--- a/content/renderer/render_view.cc
+++ b/content/renderer/render_view.cc
@@ -2715,6 +2715,16 @@ void RenderView::didChangeContentsSize(WebFrame* frame, const WebSize& size) {
CheckPreferredSize();
}
+void RenderView::mayHaveChangedRenderedSize(WebFrame* frame) {
+ if (!send_preferred_size_changes_ || !webview())
+ return;
+ // If we hit this code path, then stop the deprecated timer.
+ check_preferred_size_timer_.Stop();
+ preferred_size_change_timer_.Stop();
+ preferred_size_change_timer_.Start(TimeDelta::FromMilliseconds(10), this,
jamesr 2011/05/24 22:53:33 based on what base/timer.h says i think this Stop/
levin 2011/05/24 23:00:23 Good catch. I missed that call actually, but I don
+ &RenderView::CheckPreferredSize);
+}
+
void RenderView::CheckPreferredSize() {
// We don't always want to send the change messages over IPC, only if we've
// be put in that mode by getting a |ViewMsg_EnablePreferredSizeChangedMode|
« no previous file with comments | « content/renderer/render_view.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698