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

Unified Diff: chrome/browser/tab_contents/tab_contents_view_mac.mm

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_view_mac.mm
diff --git a/chrome/browser/tab_contents/tab_contents_view_mac.mm b/chrome/browser/tab_contents/tab_contents_view_mac.mm
index 92cbe2d4504552a7d171f12d7ff320dc5420f494..9de79b94291eda325361372044f6bc6ee717d853 100644
--- a/chrome/browser/tab_contents/tab_contents_view_mac.mm
+++ b/chrome/browser/tab_contents/tab_contents_view_mac.mm
@@ -154,10 +154,10 @@ void TabContentsViewMac::StartDragging(
}
void TabContentsViewMac::RenderViewCreated(RenderViewHost* host) {
- // We want updates whenever the intrinsic width of the webpage
- // changes. Put the RenderView into that mode.
- int routing_id = host->routing_id();
- host->Send(new ViewMsg_EnablePreferredSizeChangedMode(routing_id));
+ // We want updates whenever the intrinsic width of the webpage changes.
+ // Put the RenderView into that mode. The preferred width is used for example
+ // when the "zoom" button in the browser window is clicked.
+ host->EnablePreferredSizeChangedMode(kPreferredSizeWidth);
}
void TabContentsViewMac::SetPageTitle(const std::wstring& title) {

Powered by Google App Engine
This is Rietveld 408576698