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

Unified Diff: content/browser/browser_plugin/browser_plugin_guest.cc

Issue 1412923009: Route touch-events for WebViewGuest directly to guest renderer. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Update comments (saving first this time). Created 5 years 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/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 61dbe6c349a1cd6d7279ecab44a10dc22380760f..7d2ee45066a3e7dee940d97f60a3f6e2ac174105 100644
--- a/content/browser/browser_plugin/browser_plugin_guest.cc
+++ b/content/browser/browser_plugin/browser_plugin_guest.cc
@@ -802,6 +802,9 @@ void BrowserPluginGuest::OnWillAttachComplete(
SendQueuedMessages();
delegate_->DidAttach(GetGuestProxyRoutingID());
+ RenderWidgetHostViewGuest* rwhv = static_cast<RenderWidgetHostViewGuest*>(
+ web_contents()->GetRenderWidgetHostView());
+ rwhv->RegisterSurfaceNamespaceId();
if (!use_cross_process_frames)
has_render_view_ = true;
@@ -827,6 +830,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();
}
« no previous file with comments | « chrome/browser/apps/guest_view/web_view_browsertest.cc ('k') | content/browser/frame_host/render_widget_host_view_guest.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698