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

Issue 6247013: Don't load plugins on prerendered pages until the pages are displayed.... (Closed)

Created:
9 years, 11 months ago by mmenke
Modified:
9 years, 7 months ago
Reviewers:
cbentzel, jam
CC:
chromium-reviews, darin-cc_chromium.org, brettw-cc_chromium.org, tburkard
Visibility:
Public.

Description

Don't load plugins on prerendered pages until the pages are displayed. BUG=71216 TEST=in progress Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=71992

Patch Set 1 #

Total comments: 4
Unified diffs Side-by-side diffs Delta from patch set Stats (+89 lines, -12 lines) Patch
M chrome/browser/prerender/prerender_contents.cc View 1 chunk +6 lines, -1 line 0 comments Download
M chrome/browser/prerender/prerender_manager.cc View 2 chunks +3 lines, -0 lines 2 comments Download
M chrome/common/render_messages_internal.h View 1 chunk +3 lines, -0 lines 0 comments Download
M chrome/common/render_messages_params.h View 1 chunk +3 lines, -0 lines 0 comments Download
M chrome/common/render_messages_params.cc View 1 chunk +4 lines, -0 lines 0 comments Download
M chrome/renderer/blocked_plugin.h View 2 chunks +5 lines, -1 line 2 comments Download
M chrome/renderer/blocked_plugin.cc View 2 chunks +7 lines, -2 lines 0 comments Download
M chrome/renderer/navigation_state.h View 3 chunks +11 lines, -0 lines 0 comments Download
M chrome/renderer/navigation_state.cc View 1 chunk +1 line, -0 lines 0 comments Download
M chrome/renderer/render_view.h View 2 chunks +3 lines, -1 line 0 comments Download
M chrome/renderer/render_view.cc View 8 chunks +43 lines, -7 lines 0 comments Download

Messages

Total messages: 4 (0 generated)
mmenke
I went ahead and merged the plugin prerender CL (Updated according to the changes to ...
9 years, 11 months ago (2011-01-18 21:33:36 UTC) #1
jam
lgtm
9 years, 11 months ago (2011-01-20 18:49:56 UTC) #2
cbentzel
LGTM I thought you had a browser test for this already - or was that ...
9 years, 11 months ago (2011-01-20 19:46:59 UTC) #3
mmenke
9 years, 11 months ago (2011-01-20 20:04:21 UTC) #4
On 2011/01/20 19:46:59, cbentzel wrote:
> LGTM
> 
> I thought you had a browser test for this already - or was that contingent on
> the revalidation change in PrerenderResourceHandler?

I do, but it depends on the revalidation change, which is why it's not included
here.  Once everything is landed and I have it passing the trybots, I'll send it
to you for review.

http://codereview.chromium.org/6247013/diff/1/chrome/browser/prerender/preren...
File chrome/browser/prerender/prerender_manager.cc (right):

http://codereview.chromium.org/6247013/diff/1/chrome/browser/prerender/preren...
chrome/browser/prerender/prerender_manager.cc:98: rvh->Send(new
ViewMsg_DisplayPrerenderedPage(rvh->routing_id()));
On 2011/01/20 19:46:59, cbentzel wrote:
> Long term it _feels_ like this should go in the PrerenderContents rather than
> the PrerenderManager, but I certainly don't think that change needs to happen
> now. 

Hmm...Might make sense to have the PrerenderContents manage the entire swap
itself instead of the PrerenderManager.

Or might make sense to move it over to TabContents::SwapInRenderViewHost(),
since the TabContents really dictates what's visible.

http://codereview.chromium.org/6247013/diff/1/chrome/renderer/blocked_plugin.h
File chrome/renderer/blocked_plugin.h (right):

http://codereview.chromium.org/6247013/diff/1/chrome/renderer/blocked_plugin....
chrome/renderer/blocked_plugin.h:33: bool is_blocked_for_prerendering);
On 2011/01/20 19:46:59, cbentzel wrote:
> Would it make sense to use an enum like BLOCKED_REASON_PRERENDER and
> BLOCKED_REASON_CLICKTOPLAY rather than have a naked bool? 

It might.  Seems we have 4 reasons, I believe - outdated plugin, click to play,
"blocked" (No idea about that one), and prerendering.  The only difference in
behavior for the other 3 are the values of |template_id| and |message|, which
are currently parameters passed to the BlockedPlugin.

It might make sense to assign those strings in BlockedPlugin based on an enum,
rather than in RenderView.  I think it's tangential enough a change to not
really belong in this CL, and I have no idea what the 3rd reason actually means.

Powered by Google App Engine
This is Rietveld 408576698