OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/renderer/render_view_impl.h" | 5 #include "content/renderer/render_view_impl.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <cmath> | 8 #include <cmath> |
9 #include <memory> | 9 #include <memory> |
10 | 10 |
(...skipping 2399 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2410 } | 2410 } |
2411 | 2411 |
2412 #endif // defined(OS_ANDROID) | 2412 #endif // defined(OS_ANDROID) |
2413 | 2413 |
2414 void RenderViewImpl::OnShowContextMenu( | 2414 void RenderViewImpl::OnShowContextMenu( |
2415 ui::MenuSourceType source_type, const gfx::Point& location) { | 2415 ui::MenuSourceType source_type, const gfx::Point& location) { |
2416 input_handler_->set_context_menu_source_type(source_type); | 2416 input_handler_->set_context_menu_source_type(source_type); |
2417 has_host_context_menu_location_ = true; | 2417 has_host_context_menu_location_ = true; |
2418 host_context_menu_location_ = location; | 2418 host_context_menu_location_ = location; |
2419 if (webview()) | 2419 if (webview()) |
2420 webview()->ShowContextMenu(); | 2420 webview()->ShowContextMenu( |
| 2421 static_cast<blink::WebMenuSourceType>(source_type)); |
2421 has_host_context_menu_location_ = false; | 2422 has_host_context_menu_location_ = false; |
2422 } | 2423 } |
2423 | 2424 |
2424 #if defined(OS_ANDROID) | 2425 #if defined(OS_ANDROID) |
2425 bool RenderViewImpl::DidTapMultipleTargets( | 2426 bool RenderViewImpl::DidTapMultipleTargets( |
2426 const WebSize& inner_viewport_offset, | 2427 const WebSize& inner_viewport_offset, |
2427 const WebRect& touch_rect, | 2428 const WebRect& touch_rect, |
2428 const WebVector<WebRect>& target_rects) { | 2429 const WebVector<WebRect>& target_rects) { |
2429 // Never show a disambiguation popup when accessibility is enabled, | 2430 // Never show a disambiguation popup when accessibility is enabled, |
2430 // as this interferes with "touch exploration". | 2431 // as this interferes with "touch exploration". |
(...skipping 242 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2673 input_event.GetCoalescedEventsPointers(), latency_info, | 2674 input_event.GetCoalescedEventsPointers(), latency_info, |
2674 dispatch_type); | 2675 dispatch_type); |
2675 return INPUT_EVENT_ACK_STATE_NOT_CONSUMED; | 2676 return INPUT_EVENT_ACK_STATE_NOT_CONSUMED; |
2676 } | 2677 } |
2677 idle_user_detector_->ActivityDetected(); | 2678 idle_user_detector_->ActivityDetected(); |
2678 return RenderWidget::HandleInputEvent(input_event, latency_info, | 2679 return RenderWidget::HandleInputEvent(input_event, latency_info, |
2679 dispatch_type); | 2680 dispatch_type); |
2680 } | 2681 } |
2681 | 2682 |
2682 } // namespace content | 2683 } // namespace content |
OLD | NEW |