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

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

Issue 2278283002: Implement Mac Pop-up Dictionary for OOPIF. (Closed)
Patch Set: Addressing lfg@'s comment Created 4 years, 2 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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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_input_event_router.h" 5 #include "content/browser/renderer_host/render_widget_host_input_event_router.h"
6 6
7 #include <vector> 7 #include <vector>
8 8
9 #include "base/metrics/histogram_macros.h" 9 #include "base/metrics/histogram_macros.h"
10 10
(...skipping 576 matching lines...) Expand 10 before | Expand all | Expand 10 after
587 void RenderWidgetHostInputEventRouter::OnHittestData( 587 void RenderWidgetHostInputEventRouter::OnHittestData(
588 const FrameHostMsg_HittestData_Params& params) { 588 const FrameHostMsg_HittestData_Params& params) {
589 if (owner_map_.find(params.surface_id.client_id()) == owner_map_.end()) { 589 if (owner_map_.find(params.surface_id.client_id()) == owner_map_.end()) {
590 return; 590 return;
591 } 591 }
592 HittestData data; 592 HittestData data;
593 data.ignored_for_hittest = params.ignored_for_hittest; 593 data.ignored_for_hittest = params.ignored_for_hittest;
594 hittest_data_[params.surface_id] = data; 594 hittest_data_[params.surface_id] = data;
595 } 595 }
596 596
597 RenderWidgetHostImpl*
598 RenderWidgetHostInputEventRouter::GetRenderWidgetHostAtPoint(
599 RenderWidgetHostViewBase* root_view,
600 const gfx::Point& point,
601 gfx::Point* transformed_point) {
602 return RenderWidgetHostImpl::From(
603 FindEventTarget(root_view, point, transformed_point)
604 ->GetRenderWidgetHost());
605 }
606
597 void RenderWidgetHostInputEventRouter::RouteTouchscreenGestureEvent( 607 void RenderWidgetHostInputEventRouter::RouteTouchscreenGestureEvent(
598 RenderWidgetHostViewBase* root_view, 608 RenderWidgetHostViewBase* root_view,
599 blink::WebGestureEvent* event, 609 blink::WebGestureEvent* event,
600 const ui::LatencyInfo& latency) { 610 const ui::LatencyInfo& latency) {
601 DCHECK_EQ(blink::WebGestureDeviceTouchscreen, event->sourceDevice); 611 DCHECK_EQ(blink::WebGestureDeviceTouchscreen, event->sourceDevice);
602 612
603 if (event->type == blink::WebInputEvent::GesturePinchBegin) { 613 if (event->type == blink::WebInputEvent::GesturePinchBegin) {
604 in_touchscreen_gesture_pinch_ = true; 614 in_touchscreen_gesture_pinch_ = true;
605 // If the root view wasn't already receiving the gesture stream, then we 615 // If the root view wasn't already receiving the gesture stream, then we
606 // need to wrap the diverted pinch events in a GestureScrollBegin/End. 616 // need to wrap the diverted pinch events in a GestureScrollBegin/End.
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after
711 if (!touchpad_gesture_target_.target) 721 if (!touchpad_gesture_target_.target)
712 return; 722 return;
713 723
714 // TODO(mohsen): Add tests to check event location. 724 // TODO(mohsen): Add tests to check event location.
715 event->x += touchpad_gesture_target_.delta.x(); 725 event->x += touchpad_gesture_target_.delta.x();
716 event->y += touchpad_gesture_target_.delta.y(); 726 event->y += touchpad_gesture_target_.delta.y();
717 touchpad_gesture_target_.target->ProcessGestureEvent(*event, latency); 727 touchpad_gesture_target_.target->ProcessGestureEvent(*event, latency);
718 } 728 }
719 729
720 } // namespace content 730 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698