Index: content/browser/browser_plugin/browser_plugin_guest.cc |
diff --git a/content/browser/browser_plugin/browser_plugin_guest.cc b/content/browser/browser_plugin/browser_plugin_guest.cc |
index 2d416905944634ce8079af0ab756525f04a91342..835de1a17b4ed5a41b5661fbcf683f15929c7218 100644 |
--- a/content/browser/browser_plugin/browser_plugin_guest.cc |
+++ b/content/browser/browser_plugin/browser_plugin_guest.cc |
@@ -808,6 +808,9 @@ void BrowserPluginGuest::OnWillAttachComplete( |
SendQueuedMessages(); |
delegate_->DidAttach(GetGuestProxyRoutingID()); |
+ RenderWidgetHostViewGuest* rwhv = static_cast<RenderWidgetHostViewGuest*>( |
+ web_contents()->GetRenderWidgetHostView()); |
kenrb
2015/11/25 19:33:06
I don't exactly know how much this is a concern, b
wjmaclean
2015/11/26 13:01:03
I don't think so, but at least the touch events st
kenrb
2015/11/26 16:19:14
OOPIFs don't support touch events yet, but I don't
|
+ rwhv->RegisterSurfaceNamespaceId(); |
if (!use_cross_process_frames) |
has_render_view_ = true; |
@@ -833,6 +836,12 @@ void BrowserPluginGuest::OnDetach(int browser_plugin_instance_id) { |
// it's attached again. |
attached_ = false; |
+ RenderWidgetHostViewGuest* rwhv = static_cast<RenderWidgetHostViewGuest*>( |
+ web_contents()->GetRenderWidgetHostView()); |
+ // If the guest is terminated, our host may already be gone. |
+ if (rwhv) |
+ rwhv->UnregisterSurfaceNamespaceId(); |
+ |
delegate_->DidDetach(); |
} |