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

Unified Diff: content/renderer/render_view_impl.cc

Issue 1117023002: Keep event page alive when there's some Pepper plugin on it. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Send the event through the correct RenderFrame. Created 5 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: content/renderer/render_view_impl.cc
diff --git a/content/renderer/render_view_impl.cc b/content/renderer/render_view_impl.cc
index eb9971320db4aaff0a97e71a2efcc757be981ee0..199e8c0537223476ffe91d778a57f714a4dfe37c 100644
--- a/content/renderer/render_view_impl.cc
+++ b/content/renderer/render_view_impl.cc
@@ -1179,6 +1179,11 @@ blink::WebView* RenderViewImpl::webview() const {
void RenderViewImpl::PepperInstanceCreated(
PepperPluginInstanceImpl* instance) {
active_pepper_instances_.insert(instance);
+
+ RenderFrameImpl* const render_frame = instance->render_frame();
+ if (render_frame)
nasko 2015/05/19 17:49:34 RenderFrame should never be null, so there is no r
emaxx 2015/05/19 18:14:59 You are right. I've now placed a DCHECK here - to
nasko 2015/05/19 18:51:51 In general, we don't add DCHECK when the line afte
+ render_frame->Send(
+ new FrameHostMsg_PepperInstanceCreated(render_frame->GetRoutingID()));
}
void RenderViewImpl::PepperInstanceDeleted(
@@ -1189,6 +1194,11 @@ void RenderViewImpl::PepperInstanceDeleted(
pepper_last_mouse_event_target_ = NULL;
if (focused_pepper_plugin_ == instance)
PepperFocusChanged(instance, false);
+
+ RenderFrameImpl* const render_frame = instance->render_frame();
+ if (render_frame)
+ render_frame->Send(
+ new FrameHostMsg_PepperInstanceDeleted(render_frame->GetRoutingID()));
}
void RenderViewImpl::PepperFocusChanged(PepperPluginInstanceImpl* instance,
« no previous file with comments | « content/public/browser/web_contents_observer.h ('k') | extensions/browser/extension_web_contents_observer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698