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

Side by Side Diff: content/browser/renderer_host/render_widget_host_view_event_handler.cc

Issue 2668013005: Turn on AreCrossProcessFramesPossible by default. (Closed)
Patch Set: Fix unit tests, find potential problems. Created 3 years, 10 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 unified diff | Download patch
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "content/browser/renderer_host/render_widget_host_view_event_handler.h" 5 #include "content/browser/renderer_host/render_widget_host_view_event_handler.h"
6 6
7 #include "base/metrics/user_metrics_action.h" 7 #include "base/metrics/user_metrics_action.h"
8 #include "content/browser/renderer_host/input/touch_selection_controller_client_ aura.h" 8 #include "content/browser/renderer_host/input/touch_selection_controller_client_ aura.h"
9 #include "content/browser/renderer_host/overscroll_controller.h" 9 #include "content/browser/renderer_host/overscroll_controller.h"
10 #include "content/browser/renderer_host/render_view_host_delegate.h" 10 #include "content/browser/renderer_host/render_view_host_delegate.h"
(...skipping 822 matching lines...) Expand 10 before | Expand all | Expand 10 after
833 // one or more BrowserPlugins are present, then the event may be targeted 833 // one or more BrowserPlugins are present, then the event may be targeted
834 // to one of them, or this view. This allows GuestViews to have access to 834 // to one of them, or this view. This allows GuestViews to have access to
835 // them while still forcing pinch-zoom to be handled by the top-level 835 // them while still forcing pinch-zoom to be handled by the top-level
836 // frame. TODO(wjmaclean): At present, this doesn't work for OOPIF, but 836 // frame. TODO(wjmaclean): At present, this doesn't work for OOPIF, but
837 // it should be a simple extension to modify RenderWidgetHostViewChildFrame 837 // it should be a simple extension to modify RenderWidgetHostViewChildFrame
838 // in a similar manner to RenderWidgetHostViewGuest. 838 // in a similar manner to RenderWidgetHostViewGuest.
839 bool result = host_->delegate() && host_->delegate()->GetInputEventRouter() && 839 bool result = host_->delegate() && host_->delegate()->GetInputEventRouter() &&
840 !disable_input_event_router_for_testing_; 840 !disable_input_event_router_for_testing_;
841 // ScrollEvents get transformed into MouseWheel events, and so are treated 841 // ScrollEvents get transformed into MouseWheel events, and so are treated
842 // the same as mouse events for routing purposes. 842 // the same as mouse events for routing purposes.
843 // TODO(creis): Is this right?
wjmaclean 2017/02/03 17:01:53 Yes, I think this is correct. (Although these days
Charlie Reis 2017/02/13 22:02:49 Acknowledged.
843 if (event->IsMouseEvent() || event->type() == ui::ET_SCROLL) 844 if (event->IsMouseEvent() || event->type() == ui::ET_SCROLL)
844 result = result && SiteIsolationPolicy::AreCrossProcessFramesPossible(); 845 result = result && SiteIsolationPolicy::AreCrossProcessFramesPossible();
845 return result; 846 return result;
846 } 847 }
847 848
848 void RenderWidgetHostViewEventHandler::ProcessMouseEvent( 849 void RenderWidgetHostViewEventHandler::ProcessMouseEvent(
849 const blink::WebMouseEvent& event, 850 const blink::WebMouseEvent& event,
850 const ui::LatencyInfo& latency) { 851 const ui::LatencyInfo& latency) {
851 host_->ForwardMouseEventWithLatencyInfo(event, latency); 852 host_->ForwardMouseEventWithLatencyInfo(event, latency);
852 } 853 }
853 854
854 void RenderWidgetHostViewEventHandler::ProcessMouseWheelEvent( 855 void RenderWidgetHostViewEventHandler::ProcessMouseWheelEvent(
855 const blink::WebMouseWheelEvent& event, 856 const blink::WebMouseWheelEvent& event,
856 const ui::LatencyInfo& latency) { 857 const ui::LatencyInfo& latency) {
857 host_->ForwardWheelEventWithLatencyInfo(event, latency); 858 host_->ForwardWheelEventWithLatencyInfo(event, latency);
858 } 859 }
859 860
860 void RenderWidgetHostViewEventHandler::ProcessTouchEvent( 861 void RenderWidgetHostViewEventHandler::ProcessTouchEvent(
861 const blink::WebTouchEvent& event, 862 const blink::WebTouchEvent& event,
862 const ui::LatencyInfo& latency) { 863 const ui::LatencyInfo& latency) {
863 host_->ForwardTouchEventWithLatencyInfo(event, latency); 864 host_->ForwardTouchEventWithLatencyInfo(event, latency);
864 } 865 }
865 866
866 } // namespace content 867 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698