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

Unified Diff: chrome/renderer/blocked_plugin.cc

Issue 6247013: Don't load plugins on prerendered pages until the pages are displayed.... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 9 years, 11 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/renderer/blocked_plugin.cc
===================================================================
--- chrome/renderer/blocked_plugin.cc (revision 71683)
+++ chrome/renderer/blocked_plugin.cc (working copy)
@@ -49,11 +49,13 @@
const WebPluginParams& params,
const WebPreferences& preferences,
int template_id,
- const string16& message)
+ const string16& message,
+ bool is_blocked_for_prerendering)
: RenderViewObserver(render_view),
frame_(frame),
plugin_params_(params),
- custom_menu_showing_(false) {
+ custom_menu_showing_(false),
+ is_blocked_for_prerendering_(is_blocked_for_prerendering) {
const base::StringPiece template_html(
ResourceBundle::GetSharedInstance().GetRawDataResource(template_id));
@@ -131,6 +133,9 @@
// Don't want to swallow these messages.
if (message.type() == ViewMsg_LoadBlockedPlugins::ID) {
LoadPlugin();
+ } else if (message.type() == ViewMsg_DisplayPrerenderedPage::ID) {
+ if (is_blocked_for_prerendering_)
+ LoadPlugin();
} else if (message.type() == ViewMsg_ContextMenuClosed::ID) {
custom_menu_showing_ = false;
}

Powered by Google App Engine
This is Rietveld 408576698