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

Unified Diff: content/browser/web_contents/web_contents_impl.cc

Issue 1255483004: Implement surface-based browser process hit testing for Mac and Aura (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Comments addressed Created 5 years, 4 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/browser/web_contents/web_contents_impl.cc
diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc
index fe8fb358060b07f154868a01334a0a1eb8f62eb7..f90ef48fb22573d44428c2a19f705426697e47d1 100644
--- a/content/browser/web_contents/web_contents_impl.cc
+++ b/content/browser/web_contents/web_contents_impl.cc
@@ -54,6 +54,7 @@
#include "content/browser/renderer_host/render_view_host_delegate_view.h"
#include "content/browser/renderer_host/render_view_host_impl.h"
#include "content/browser/renderer_host/render_widget_host_impl.h"
+#include "content/browser/renderer_host/render_widget_host_input_event_router.h"
#include "content/browser/renderer_host/render_widget_host_view_base.h"
#include "content/browser/screen_orientation/screen_orientation_dispatcher_host_impl.h"
#include "content/browser/site_instance_impl.h"
@@ -416,6 +417,8 @@ WebContentsImpl::WebContentsImpl(BrowserContext* browser_context)
WebContentsImpl::~WebContentsImpl() {
is_being_destroyed_ = true;
+ rwh_input_event_router_.reset();
+
// Delete all RFH pending shutdown, which will lead the corresponding RVH to
// shutdown and be deleted as well.
frame_tree_.ForEach(
@@ -1569,6 +1572,14 @@ bool WebContentsImpl::PreHandleGestureEvent(
return delegate_ && delegate_->PreHandleGestureEvent(this, event);
}
+RenderWidgetHostInputEventRouter* WebContentsImpl::GetInputEventRouter() {
+ // Currently only supported in site per process mode (--site-per-process).
+ if (!rwh_input_event_router_.get() && !is_being_destroyed_ &&
+ SiteIsolationPolicy::AreCrossProcessFramesPossible())
+ rwh_input_event_router_.reset(new RenderWidgetHostInputEventRouter);
+ return rwh_input_event_router_.get();
+}
+
void WebContentsImpl::EnterFullscreenMode(const GURL& origin) {
// This method is being called to enter renderer-initiated fullscreen mode.
// Make sure any existing fullscreen widget is shut down first.

Powered by Google App Engine
This is Rietveld 408576698