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

Unified Diff: chrome/browser/tab_contents/tab_contents.cc

Issue 2145002: Mac: Fix renderer idle cpu usage regression. (Closed)
Patch Set: rebase Created 10 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
Index: chrome/browser/tab_contents/tab_contents.cc
diff --git a/chrome/browser/tab_contents/tab_contents.cc b/chrome/browser/tab_contents/tab_contents.cc
index 3e38fe05ce290eddea371479cfebea1cdc4e5575..f3160ccd58569cd7e297cb9e66c933ce0a1ce931 100644
--- a/chrome/browser/tab_contents/tab_contents.cc
+++ b/chrome/browser/tab_contents/tab_contents.cc
@@ -789,8 +789,10 @@ bool TabContents::NavigateToPendingEntry(
if (!dest_render_view_host)
return false; // Unable to create the desired render view host.
- if (delegate_ && delegate_->ShouldEnablePreferredSizeNotifications())
- dest_render_view_host->EnablePreferredSizeChangedMode();
+ if (delegate_ && delegate_->ShouldEnablePreferredSizeNotifications()) {
+ dest_render_view_host->EnablePreferredSizeChangedMode(
+ kPreferredSizeWidth | kPreferredSizeHeightThisIsSlow);
+ }
// For security, we should never send non-DOM-UI URLs (other than about:blank)
// to a DOM UI renderer. Double check that here.

Powered by Google App Engine
This is Rietveld 408576698